diff options
author | Philip Hands <phil@hands.com> | 2017-06-29 22:11:09 +0200 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2017-08-01 00:53:58 -0400 |
commit | a6f41c35e337db192e612ee6e1545fcae4c69ac7 (patch) | |
tree | 3d03ff353fee11bb00de060f73c6b4d040173e9a /cucumber/features/step_definitions/git.rb | |
parent | c49069662ccf276a7b97f77524f3e2638c9fa152 (diff) | |
download | jenkins.debian.net-a6f41c35e337db192e612ee6e1545fcae4c69ac7.tar.xz |
lvc: grab updates from tails (01371c19bd..6ae59c49e5)
Signed-off-by: Holger Levsen <holger@layer-acht.org>
Diffstat (limited to 'cucumber/features/step_definitions/git.rb')
-rw-r--r-- | cucumber/features/step_definitions/git.rb | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/cucumber/features/step_definitions/git.rb b/cucumber/features/step_definitions/git.rb index bf6f869d..bd8fcf7d 100644 --- a/cucumber/features/step_definitions/git.rb +++ b/cucumber/features/step_definitions/git.rb @@ -1,3 +1,29 @@ +When /^I clone the Git repository "([\S]+)" in GNOME Terminal$/ do |repo| + repo_directory = /[\S]+\/([\S]+)(\.git)?$/.match(repo)[1] + assert(!$vm.directory_exist?("/home/#{LIVE_USER}/#{repo_directory}")) + + recovery_proc = Proc.new do + $vm.execute("rm -rf /home/#{LIVE_USER}/#{repo_directory}", + :user => LIVE_USER) + step 'I kill the process "git"' + @screen.type('clear' + Sikuli::Key.ENTER) + end + + retry_tor(recovery_proc) do + step "I run \"git clone #{repo}\" in GNOME Terminal" + m = /^(https?|git):\/\//.match(repo) + unless m + step 'I verify the SSH fingerprint for the Git repository' + end + try_for(180, :msg => 'Git process took too long') { + !$vm.has_process?('/usr/bin/git') + } + Dogtail::Application.new('gnome-terminal-server') + .child('Terminal', roleName: 'terminal') + .text['Unpacking objects: 100%'] + end +end + Then /^the Git repository "([\S]+)" has been cloned successfully$/ do |repo| assert($vm.directory_exist?("/home/#{LIVE_USER}/#{repo}/.git")) assert($vm.file_exist?("/home/#{LIVE_USER}/#{repo}/.git/config")) |