From 9feb8f33f05700eec0311c0ab6ef1ad4268cf176 Mon Sep 17 00:00:00 2001 From: James Lopez Date: Wed, 28 Mar 2018 10:05:06 +0200 Subject: add initial boilerplate for QA task --- qa/qa/scenario/test/administration/backup.rb | 17 +++++++++++++++++ qa/qa/service/omnibus.rb | 8 ++++++++ 2 files changed, 25 insertions(+) create mode 100644 qa/qa/scenario/test/administration/backup.rb diff --git a/qa/qa/scenario/test/administration/backup.rb b/qa/qa/scenario/test/administration/backup.rb new file mode 100644 index 00000000000..3ecd0fe2ce7 --- /dev/null +++ b/qa/qa/scenario/test/administration/backup.rb @@ -0,0 +1,17 @@ +module QA + module Scenario + module Test + module Administration + class Backup + def self.perform(address, *files) + Test::Instance.perform(address, *files) + + QA::Service::Omnibus.new(options.name).act do + gitlab_rake 'gitlab:backup:create' + end + end + end + end + end + end +end diff --git a/qa/qa/service/omnibus.rb b/qa/qa/service/omnibus.rb index b5c06874e5c..8b92a83da8b 100644 --- a/qa/qa/service/omnibus.rb +++ b/qa/qa/service/omnibus.rb @@ -15,6 +15,14 @@ module QA shell "docker exec #{@name} bash -c '#{input} | gitlab-ctl #{command}'" end end + + def gitlab_rake(command, input: nil) + if input.nil? + shell "docker exec #{@name} gitlab-rake #{command}" + else + shell "docker exec #{@name} bash -c '#{input} | gitlab-rake #{command}'" + end + end end end end -- cgit v1.2.1