diff options
author | Thong Kuah <tkuah@gitlab.com> | 2018-09-07 15:07:47 +1200 |
---|---|---|
committer | Thong Kuah <tkuah@gitlab.com> | 2018-09-14 16:26:51 +1200 |
commit | c9af170d9aeeb39dbb41a99c00402beb384da0e9 (patch) | |
tree | 53544844fd8ac75f0fc2f2d44595b01089fad874 /spec/models | |
parent | 2e47e1f80e000fb717f89effef983bf22c9e2f4d (diff) | |
download | gitlab-ce-c9af170d9aeeb39dbb41a99c00402beb384da0e9.tar.gz |
Create a GKE cluster with legacy_abac disabled when the `:rbac_clusters` feature flag is enabled
Explicitly persist the legacy_abac value of the cluster_provider_gcp so that we can disable abac if the `:rbac_clusters` feature flag is enabled
Diffstat (limited to 'spec/models')
-rw-r--r-- | spec/models/clusters/providers/gcp_spec.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/spec/models/clusters/providers/gcp_spec.rb b/spec/models/clusters/providers/gcp_spec.rb index b38b5e6bcad..d134608b538 100644 --- a/spec/models/clusters/providers/gcp_spec.rb +++ b/spec/models/clusters/providers/gcp_spec.rb @@ -74,6 +74,24 @@ describe Clusters::Providers::Gcp do end end + describe '#legacy_abac?' do + let(:gcp) { build(:cluster_provider_gcp) } + + subject { gcp } + + it 'should default to true' do + is_expected.to be_legacy_abac + end + + context 'legacy_abac is set to false' do + let(:gcp) { build(:cluster_provider_gcp, legacy_abac: false) } + + it 'is false' do + is_expected.not_to be_legacy_abac + end + end + end + describe '#state_machine' do context 'when any => [:created]' do let(:gcp) { build(:cluster_provider_gcp, :creating) } |