summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2017-06-02 21:00:56 +0800
committerLin Jen-Shin <godfat@godfat.org>2017-06-02 21:34:31 +0800
commit4968f226a0730de12c5f50b23e8e08360d906c3d (patch)
tree776903a296bb3e9dcd900a31a688f0016ee4cb77 /spec
parent3731ae092cac523a0092c64000d9e838662a85df (diff)
downloadgitlab-ce-4968f226a0730de12c5f50b23e8e08360d906c3d.tar.gz
Make sure that environment was created before deploying
Diffstat (limited to 'spec')
-rw-r--r--spec/support/cycle_analytics_helpers.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/spec/support/cycle_analytics_helpers.rb b/spec/support/cycle_analytics_helpers.rb
index 7317ce6b907..6e1eb5c678d 100644
--- a/spec/support/cycle_analytics_helpers.rb
+++ b/spec/support/cycle_analytics_helpers.rb
@@ -78,6 +78,8 @@ module CycleAnalyticsHelpers
end
def new_dummy_job(environment)
+ project.environments.find_or_create_by(name: environment)
+
Ci::Build.new(
project: project,
user: user,