summaryrefslogtreecommitdiff
path: root/spec/support
diff options
context:
space:
mode:
authorMayra Cabrera <mcabrera@gitlab.com>2018-01-04 09:33:51 +0000
committerKamil TrzciƄski <ayufan@ayufan.eu>2018-01-04 09:33:51 +0000
commite028d795c484dcd1030b4f6bba8f53d4e677f0b3 (patch)
tree4471dd62763aa97e21d12a2ef75fcec612ca6785 /spec/support
parent0e7e9e32b30bd3c310a769eaef91843b609697df (diff)
downloadgitlab-ce-e028d795c484dcd1030b4f6bba8f53d4e677f0b3.tar.gz
41054-Disallow creation of new Kubernetes integrations
Diffstat (limited to 'spec/support')
-rw-r--r--spec/support/services_shared_context.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/support/services_shared_context.rb b/spec/support/services_shared_context.rb
index 7457484a932..3f1fd169b72 100644
--- a/spec/support/services_shared_context.rb
+++ b/spec/support/services_shared_context.rb
@@ -29,5 +29,13 @@ Service.available_services_names.each do |service|
end
end
end
+
+ def initialize_service(service)
+ service_item = project.find_or_initialize_service(service)
+ service_item.properties = service_attrs
+ service_item.active = true if service == "kubernetes"
+ service_item.save
+ service_item
+ end
end
end