summaryrefslogtreecommitdiff
path: root/spec/factories
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-05-18 12:08:08 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-05-18 12:08:08 +0000
commit48650fe1bfc1e3d20ec3a5702ef4d64e9fe69912 (patch)
tree0f73ad6e03989c301b79490ddb30125c233e4eff /spec/factories
parent1b9a2ce27825c02cc14b594ed5ea061fccf1d957 (diff)
downloadgitlab-ce-48650fe1bfc1e3d20ec3a5702ef4d64e9fe69912.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/factories')
-rw-r--r--spec/factories/ci/job_artifacts.rb15
-rw-r--r--spec/factories/clusters/applications/helm.rb4
2 files changed, 19 insertions, 0 deletions
diff --git a/spec/factories/ci/job_artifacts.rb b/spec/factories/ci/job_artifacts.rb
index 61091514822..26c09795a0b 100644
--- a/spec/factories/ci/job_artifacts.rb
+++ b/spec/factories/ci/job_artifacts.rb
@@ -252,6 +252,21 @@ FactoryBot.define do
end
end
+ trait :cluster_applications do
+ file_type { :cluster_applications }
+ file_format { :gzip }
+
+ transient do
+ file do
+ fixture_file_upload(Rails.root.join('spec/fixtures/helm/helm_list_v2_prometheus_missing.json.gz'), 'application/x-gzip')
+ end
+ end
+
+ after(:build) do |artifact, evaluator|
+ artifact.file = evaluator.file
+ end
+ end
+
trait :correct_checksum do
after(:build) do |artifact, evaluator|
artifact.file_sha256 = Digest::SHA256.file(artifact.file.path).hexdigest
diff --git a/spec/factories/clusters/applications/helm.rb b/spec/factories/clusters/applications/helm.rb
index 7e52c54d4f1..c49c26f06e5 100644
--- a/spec/factories/clusters/applications/helm.rb
+++ b/spec/factories/clusters/applications/helm.rb
@@ -65,6 +65,10 @@ FactoryBot.define do
status_reason { 'something went wrong' }
end
+ trait :uninstalled do
+ status { 10 }
+ end
+
trait :timed_out do
installing
updated_at { ClusterWaitForAppInstallationWorker::TIMEOUT.ago }