Commit 6b8d88d2 authored by Kamil Trzcinski's avatar Kamil Trzcinski

Use gitlab.yml.example instead of settings logic stubbing

parent 167296f4
......@@ -729,6 +729,18 @@ test:
enabled: true
lfs:
enabled: false
artifacts:
enabled: true
# The location where build artifacts are stored (default: shared/artifacts).
# path: shared/artifacts
object_store:
enabled: false
remote_directory: artifacts # The bucket name
connection:
provider: AWS # Only AWS supported at the moment
aws_access_key_id: AWS_ACCESS_KEY_ID
aws_secret_access_key: AWS_SECRET_ACCESS_KEY
region: eu-central-1
gitlab:
host: localhost
port: 80
......
module StubConfiguration
def stub_artifacts_object_storage(enabled: true)
Fog.mock!
object_store = Settingslogic.new(
'enabled' => enabled,
'remote_directory' => 'artifacts',
'connection' => Settingslogic.new(
'provider' => 'AWS',
'aws_access_key_id' => 'AWS_ACCESS_KEY_ID',
'aws_secret_access_key' => 'AWS_SECRET_ACCESS_KEY',
'region' => 'eu-central-1'
)
)
allow(Gitlab.config.artifacts).to receive(:object_store) { object_store }
allow(Gitlab.config.artifacts.object_store).to receive(:enabled) { enabled }
allow_any_instance_of(ArtifactUploader).to receive(:verify_license!) { true }
return unless enabled
......
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