summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Lopez <james@jameslopez.es>2018-03-28 10:05:06 +0200
committerJames Lopez <james@jameslopez.es>2018-03-28 10:05:06 +0200
commit9feb8f33f05700eec0311c0ab6ef1ad4268cf176 (patch)
treeea6512acabc24174fef2b691bc62dc466a077cfc
parentb17457a7f7fb390c829ff5feed7e4635bf2b4521 (diff)
downloadgitlab-ce-feature/basckup-restore-qa-task.tar.gz
add initial boilerplate for QA taskfeature/basckup-restore-qa-task
-rw-r--r--qa/qa/scenario/test/administration/backup.rb17
-rw-r--r--qa/qa/service/omnibus.rb8
2 files changed, 25 insertions, 0 deletions
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