test_spec.rb 1.5 KB

123456789101112131415161718192021
  1. require 'serverspec'
  2. # Required by serverspec
  3. set :backend, :exec
  4. describe user('user1_yaml') do
  5. it { should exist }
  6. it { have_login_shell '/bin/true' }
  7. it { should have_authorized_key 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDfIG0Zqxtj+OGordHLn82CWzRXA3++D5BdevRx7kCJE50gRhuUbc2lImBbLE+1JRlzwpg+a1AWbM1MTiHJyLbw7e4+KxfUaPxclktvrCD3xqN/Pn0ncgCcZNFrXfeP4RbHN143qzy8ri0Vn4o/3OYK9KZGkfIT+ix8TpD6804LLjrgmgFcEDxJILFNeVL187vfoGdhh/Wed4JMZSWjiXMjA9WHzFkYDWW6HhlmmjNrXQvaQTWpmDAABvP918N7LLf8KuhTcXfyWrVOCpc0jNZKOtzvScixOi2licUkJ/xlGYbirr8cmV9gS+5UzUdzMstZeiKNXkU7imcInsSk5BFv yaml1' }
  8. end
  9. describe user('user2_yaml') do
  10. it { should exist }
  11. it { should have_authorized_key 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDXfwZI7qSBnqEwlxWFBQt9YpdhR7bHYbtcRuy77EmAu1VPZmfn+pIDLUXn5sTOZQxzXN32GohJOlC8vW63WMnROVRlI3yVjspcmxEcHeATsFEKfg2JDdH2m88fiG2JaVFBnV9N/obfGZiWCRxmjodttyETw/nvTzAQTczvalO0lm0bkfgkiGffFREucQikf+ZRbgRQmIZxNX2dYMN5nNIcRXjv+2z//N30J22Lzmo0JXRmByBIkCG+QVrvc3UudJ2prkebDp60CoTiPgA9nnpLxYbBbX4QU/q/sYTwb/wMv8g+4AENEJ8RWPIcpLXt65vTUcpbPTuEM8egfSDtlwph yaml2' }
  12. end
  13. describe user('user3_json') do
  14. it { should exist }
  15. it { should have_authorized_key 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDY3q7JKLPiPawSUK6NIJWKMl1EV9ORJkqrMIQsxanYQyElWw3Y+aj9Kbtl37hbQIYtHVb2y43e26MjlY8XfpHGRtKxtR6t+oIgxVNV3paT31OkJSiLgNS8yn7+JbyeTSu7UN2XdPZgSIF8yCWmNFvwRkW+TsRwCobXJqDwzhSx/BphLqR9ADV+nCyfhG3T/BgJ8XWsio60cOTl/Qy9aIcyDOdsu/HJtB7hIAfxbSMksocMnssJYds3wMQnNYwGVEbHVzJk8priR8GsGBgT8Bh83JmB+gDBXEfT4hRfJ0eC4ekwLAH/bg9IZhfOOQJMQHdk16HL32XNM3TPQiy9845D user3_json' }
  16. end