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
This commit is contained in:
Steve Azzopardi 2019-04-24 17:31:37 +02:00
parent 90ddfda612
commit 68dae77b05
No known key found for this signature in database
GPG key ID: B6FAD416292DEF2B

View file

@ -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