Skip to content

Commit

Permalink
API-24392: Remove test feature from VBADocuments enabled_features c…
Browse files Browse the repository at this point in the history
…onfig (#12300)

* API-24392: Remove test feature from enabled_features config
  • Loading branch information
kristen-brown authored Mar 30, 2023
1 parent ca4e64d commit 6c7dd5d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 0 additions & 1 deletion modules/vba_documents/config/flipper/enabled_features.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
common:
- test_feature_flag_alert_temp
development:
staging:
sandbox:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@
end

it 'does not notify Slack when all features are enabled' do
allow(YAML).to receive(:load_file).and_return({ 'common' => %w[feature1 feature2] })
bulk_checker_result = { enabled: %w[feature1 feature2], disabled: [], missing: [] }
allow(Flipper::Utilities::BulkFeatureChecker).to receive(:enabled_status).and_return(bulk_checker_result)
expect(VBADocuments::Slack::Messenger).not_to receive(:new)
Expand All @@ -99,6 +100,7 @@
end

it 'notifies Slack when some features are disabled' do
allow(YAML).to receive(:load_file).and_return({ 'common' => %w[feature1 feature2 feature3] })
bulk_checker_result = { enabled: %w[feature1], disabled: %w[feature2 feature3], missing: [] }
allow(Flipper::Utilities::BulkFeatureChecker).to receive(:enabled_status).and_return(bulk_checker_result)
expected_notify = {
Expand All @@ -114,6 +116,7 @@
end

it 'notifies Slack when some features are missing' do
allow(YAML).to receive(:load_file).and_return({ 'common' => %w[feature1 feature2 feature3] })
bulk_checker_result = { enabled: %w[feature1], disabled: [], missing: %w[feature2 feature3] }
allow(Flipper::Utilities::BulkFeatureChecker).to receive(:enabled_status).and_return(bulk_checker_result)
expected_notify = {
Expand All @@ -129,6 +132,7 @@
end

it 'notifies slack when there are disabled and missing features' do
allow(YAML).to receive(:load_file).and_return({ 'common' => %w[feature1 feature2 feature3 feature4 feature5] })
bulk_checker_result = { enabled: %w[feature1], disabled: %w[feature2 feature3], missing: %w[feature4 feature5] }
allow(Flipper::Utilities::BulkFeatureChecker).to receive(:enabled_status).and_return(bulk_checker_result)
expected_notify = {
Expand Down

0 comments on commit 6c7dd5d

Please sign in to comment.