Commit ad138e9c authored by Rémy Coutable's avatar Rémy Coutable

Fix Ruby 2.7 warnings in spec/support/helpers/kubernetes_helpers.rb

Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent 4f6ec9c2
...@@ -75,11 +75,9 @@ RSpec.describe Clusters::Kubernetes::FetchKubernetesTokenService do ...@@ -75,11 +75,9 @@ RSpec.describe Clusters::Kubernetes::FetchKubernetesTokenService do
before do before do
stub_kubeclient_get_secret_missing_token_then_with_token( stub_kubeclient_get_secret_missing_token_then_with_token(
api_url, api_url,
{ metadata_name: service_account_token_name,
metadata_name: service_account_token_name, namespace: namespace,
namespace: namespace, token: token
token: token
}
) )
end end
......
...@@ -167,7 +167,7 @@ module KubernetesHelpers ...@@ -167,7 +167,7 @@ module KubernetesHelpers
options[:namespace] ||= "default" options[:namespace] ||= "default"
WebMock.stub_request(:get, api_url + "/api/v1/namespaces/#{options[:namespace]}/secrets/#{options[:metadata_name]}") WebMock.stub_request(:get, api_url + "/api/v1/namespaces/#{options[:namespace]}/secrets/#{options[:metadata_name]}")
.to_return(kube_response(kube_v1_secret_body(**options))) .to_return(kube_response(kube_v1_secret_body(options)))
end end
def stub_kubeclient_get_secret_error(api_url, name, namespace: 'default', status: 404) def stub_kubeclient_get_secret_error(api_url, name, namespace: 'default', status: 404)
...@@ -265,7 +265,7 @@ module KubernetesHelpers ...@@ -265,7 +265,7 @@ module KubernetesHelpers
.to_return(kube_response({})) .to_return(kube_response({}))
end end
def kube_v1_secret_body(**options) def kube_v1_secret_body(options)
{ {
"kind" => "SecretList", "kind" => "SecretList",
"apiVersion": "v1", "apiVersion": "v1",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment