Commit 80dc759e authored by Heinrich Lee Yu's avatar Heinrich Lee Yu

Merge branch 'improve-ci_validate_build_dependencies-feature-flag' into 'master'

Add project actor for ci_validate_build_dependencies feature flag

See merge request gitlab-org/gitlab!53685
parents 0faec0a1 00fa5bae
......@@ -64,7 +64,7 @@ module Gitlab
end
def self.validate_build_dependencies?(project)
::Feature.enabled?(:ci_validate_build_dependencies, default_enabled: :yaml) &&
::Feature.enabled?(:ci_validate_build_dependencies, project, default_enabled: :yaml) &&
::Feature.disabled?(:ci_validate_build_dependencies_override, project)
end
......
......@@ -474,6 +474,22 @@ module Ci
end
it_behaves_like 'validation is active'
context 'when the main feature flag is enabled for a specific project' do
before do
stub_feature_flags(ci_validate_build_dependencies: pipeline.project)
end
it_behaves_like 'validation is active'
end
context 'when the main feature flag is enabled for a different project' do
before do
stub_feature_flags(ci_validate_build_dependencies: create(:project))
end
it_behaves_like 'validation is not active'
end
end
context 'when validates for dependencies is disabled' do
......
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