diff options
author | Steve Azzopardi <sazzopardi@gitlab.com> | 2019-04-24 17:31:37 +0200 |
---|---|---|
committer | Steve Azzopardi <sazzopardi@gitlab.com> | 2019-04-24 17:37:17 +0200 |
commit | 68dae77b05986c25b6651c0479d6cff791d2154d (patch) | |
tree | adc912783d6b1be511687017ed8fafacd5945fec | |
parent | 90ddfda612eba5533dccebbba205bac9dd8f0ac6 (diff) | |
download | gitlab-ce-68dae77b05986c25b6651c0479d6cff791d2154d.tar.gz |
Use constants for assertion for helm chart test
We are duplicating the value from the constant
`Clusters::Applications::Runner::VERSION` inside of the tests which
results into developers having to update the tests as well when they
want to upgrade the Helm chart used for GitLab Runner
-rw-r--r-- | spec/models/clusters/applications/runner_spec.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/models/clusters/applications/runner_spec.rb b/spec/models/clusters/applications/runner_spec.rb index de406211a5b..b66acf13135 100644 --- a/spec/models/clusters/applications/runner_spec.rb +++ b/spec/models/clusters/applications/runner_spec.rb @@ -24,7 +24,7 @@ describe Clusters::Applications::Runner do it 'is initialized with 4 arguments' do expect(subject.name).to eq('runner') expect(subject.chart).to eq('runner/gitlab-runner') - expect(subject.version).to eq('0.4.0') + expect(subject.version).to eq(Clusters::Applications::Runner::VERSION) expect(subject).to be_rbac expect(subject.repository).to eq('https://charts.gitlab.io') expect(subject.files).to eq(gitlab_runner.files) @@ -42,7 +42,7 @@ describe Clusters::Applications::Runner do let(:gitlab_runner) { create(:clusters_applications_runner, :errored, runner: ci_runner, version: '0.1.13') } it 'is initialized with the locked version' do - expect(subject.version).to eq('0.4.0') + expect(subject.version).to eq(Clusters::Applications::Runner::VERSION) end end end |