Commit 00fa5bae authored by Shinya Maeda's avatar Shinya Maeda

Add project actor for ci_validate_build_dependencies feature flag

This commit adds the actor for the dependency validation
feature flag.
parent 037369be
......@@ -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