Fix acceptance hang
authorHunter Haugen <hunter@puppetlabs.com>
Thu, 20 Aug 2015 22:24:28 +0000 (15:24 -0700)
committerHunter Haugen <hunter@puppetlabs.com>
Thu, 20 Aug 2015 22:24:28 +0000 (15:24 -0700)
The ssh-keygen is waiting for a 'y' to confirm overwrite, and the test hangs.

spec/acceptance/modules_2326_spec.rb

index d62dbb0..601c6ff 100644 (file)
@@ -32,7 +32,7 @@ describe 'clones with special characters' do
 
       # create ssh keys
       shell('mkdir -p /home/testuser-ssh/.ssh')
-      shell('ssh-keygen -q -t rsa -f /home/testuser-ssh/.ssh/id_rsa -N ""')
+      shell('echo -e \'y\n\'|ssh-keygen -q -t rsa -f /home/testuser-ssh/.ssh/id_rsa -N ""')
 
       # copy public key to authorized_keys
       shell('cat /home/testuser-ssh/.ssh/id_rsa.pub > /home/testuser-ssh/.ssh/authorized_keys')