Skip to content

Commit

Permalink
Update rho auth tests
Browse files Browse the repository at this point in the history
Update the tests to assert for the new `sudo_password` field added to
the output of the auth entries.

Closes #15
  • Loading branch information
elyezer committed Aug 21, 2017
1 parent 36f236d commit 4b9e915
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions camayoc/tests/rho/test_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ def test_add_with_username_password(isolated_filesystem):
' "name": "{}",\r\n'
' "password": "{}",\r\n'
' "ssh_key_file": null,\r\n'
' "sudo_password": null,\r\n'
' "username": "{}"\r\n'
'}}\r\n'
.format(name, MASKED_PASSWORD_OUTPUT, username)
Expand Down Expand Up @@ -94,6 +95,7 @@ def test_add_with_username_sshkeyfile(isolated_filesystem):
' "name": "{}",\r\n'
' "password": null,\r\n'
' "ssh_key_file": "{}",\r\n'
' "sudo_password": null,\r\n'
' "username": "{}"\r\n'
'}}\r\n'
.format(name, sshkeyfile, username)
Expand Down Expand Up @@ -132,6 +134,7 @@ def test_edit_username(isolated_filesystem):
' "name": "{}",\r\n'
' "password": null,\r\n'
' "ssh_key_file": "{}",\r\n'
' "sudo_password": null,\r\n'
' "username": "{}"\r\n'
'}}\r\n'
.format(name, sshkeyfile, username)
Expand Down Expand Up @@ -159,6 +162,7 @@ def test_edit_username(isolated_filesystem):
' "name": "{}",\r\n'
' "password": null,\r\n'
' "ssh_key_file": "{}",\r\n'
' "sudo_password": null,\r\n'
' "username": "{}"\r\n'
'}}\r\n'
.format(name, sshkeyfile, new_username)
Expand Down Expand Up @@ -231,6 +235,7 @@ def test_edit_password(isolated_filesystem):
' "name": "{}",\r\n'
' "password": "{}",\r\n'
' "ssh_key_file": null,\r\n'
' "sudo_password": null,\r\n'
' "username": "{}"\r\n'
'}}\r\n'
.format(name, MASKED_PASSWORD_OUTPUT, username)
Expand Down Expand Up @@ -260,6 +265,7 @@ def test_edit_password(isolated_filesystem):
' "name": "{}",\r\n'
' "password": "{}",\r\n'
' "ssh_key_file": null,\r\n'
' "sudo_password": null,\r\n'
' "username": "{}"\r\n'
'}}\r\n'
.format(name, MASKED_PASSWORD_OUTPUT, username)
Expand Down Expand Up @@ -326,6 +332,7 @@ def test_edit_sshkeyfile(isolated_filesystem):
' "name": "{}",\r\n'
' "password": null,\r\n'
' "ssh_key_file": "{}",\r\n'
' "sudo_password": null,\r\n'
' "username": "{}"\r\n'
'}}\r\n'
.format(name, sshkeyfile, username)
Expand Down Expand Up @@ -353,6 +360,7 @@ def test_edit_sshkeyfile(isolated_filesystem):
' "name": "{}",\r\n'
' "password": null,\r\n'
' "ssh_key_file": "{}",\r\n'
' "sudo_password": null,\r\n'
' "username": "{}"\r\n'
'}}\r\n'
.format(name, new_sshkeyfile, username)
Expand Down Expand Up @@ -444,6 +452,7 @@ def test_clear(isolated_filesystem):
' "name": "{}",\r\n'
' "password": null,\r\n'
' "ssh_key_file": "{}",\r\n'
' "sudo_password": null,\r\n'
' "username": "{}"\r\n'
'}}\r\n'
.format(name, sshkeyfile, username)
Expand Down Expand Up @@ -515,6 +524,7 @@ def test_clear_all(isolated_filesystem):
'name': name,
'password': None,
'ssh_key_file': sshkeyfile,
'sudo_password': None,
'username': username,
}
auths.append(auth)
Expand Down

0 comments on commit 4b9e915

Please sign in to comment.