Commit ae99f74b authored by Grzegorz Bizon's avatar Grzegorz Bizon

Improve kubernetes service specs readability

parent cdcc196c
...@@ -203,18 +203,13 @@ describe KubernetesService, :use_clean_rails_memory_store_caching do ...@@ -203,18 +203,13 @@ describe KubernetesService, :use_clean_rails_memory_store_caching do
describe '#predefined_variables' do describe '#predefined_variables' do
let(:kubeconfig) do let(:kubeconfig) do
config = config_file = expand_fixture_path('config/kubeconfig.yml')
YAML.load(File.read(expand_fixture_path('config/kubeconfig.yml'))) config = YAML.load(File.read(config_file))
config.dig('users', 0, 'user')['token'] = 'token'
config.dig('users', 0, 'user')['token'] = config.dig('contexts', 0, 'context')['namespace'] = namespace
'token'
config.dig('clusters', 0, 'cluster')['certificate-authority-data'] = config.dig('clusters', 0, 'cluster')['certificate-authority-data'] =
Base64.encode64('CA PEM DATA') Base64.encode64('CA PEM DATA')
config.dig('contexts', 0, 'context')['namespace'] =
namespace
YAML.dump(config) YAML.dump(config)
end end
......
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