summaryrefslogtreecommitdiff
path: root/spec/support/services_shared_context.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/support/services_shared_context.rb')
-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