Skip to content

Commit

Permalink
Update cli test_credentials tests
Browse files Browse the repository at this point in the history
Update the tests so they pass after the issue #330 being
resolved.

Close #111
  • Loading branch information
elyezer committed Jan 15, 2018
1 parent 19a172a commit 8d7ab2b
Showing 1 changed file with 8 additions and 13 deletions.
21 changes: 8 additions & 13 deletions camayoc/tests/qcs/cli/test_credentials.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,6 @@ def test_add_with_username_sshkeyfile_sudo_password(
)


@pytest.mark.xfail(
reason='https://github.com/quipucords/quipucords/issues/330')
def test_edit_username(isolated_filesystem, qpc_server_config):
"""Edit an auth's username.
Expand Down Expand Up @@ -201,8 +199,8 @@ def test_edit_username(isolated_filesystem, qpc_server_config):
'qpc cred edit --name={} --username={}'.format(name, new_username)
)
qpc_cred_edit.logfile = BytesIO()
assert qpc_cred_edit.expect(pexpect.EOF) == 0
assert qpc_cred_edit.expect('Credential \'{}\' updated'.format(name)) == 0
assert qpc_cred_edit.expect(
'Credential "{}" was updated'.format(name)) == 0
assert qpc_cred_edit.expect(pexpect.EOF) == 0
qpc_cred_edit.close()
assert qpc_cred_edit.exitstatus == 0
Expand Down Expand Up @@ -248,8 +246,6 @@ def test_edit_username_negative(isolated_filesystem, qpc_server_config):
assert qpc_cred_edit.exitstatus != 0


@pytest.mark.xfail(
reason='https://github.com/quipucords/quipucords/issues/330')
def test_edit_password(isolated_filesystem, qpc_server_config):
"""Edit an auth's password.
Expand Down Expand Up @@ -287,7 +283,8 @@ def test_edit_password(isolated_filesystem, qpc_server_config):
)
assert qpc_cred_edit.expect(CONNECTION_PASSWORD_INPUT) == 0
qpc_cred_edit.sendline(new_password)
assert qpc_cred_edit.expect('Credential \'{}\' updated'.format(name)) == 0
assert qpc_cred_edit.expect(
'Credential "{}" was updated'.format(name)) == 0
assert qpc_cred_edit.expect(pexpect.EOF) == 0
qpc_cred_edit.close()
assert qpc_cred_edit.exitstatus == 0
Expand Down Expand Up @@ -332,8 +329,6 @@ def test_edit_password_negative(isolated_filesystem, qpc_server_config):
assert qpc_cred_edit.exitstatus != 0


@pytest.mark.xfail(
reason='https://github.com/quipucords/quipucords/issues/330')
def test_edit_sshkeyfile(isolated_filesystem, qpc_server_config):
"""Edit an auth's sshkeyfile.
Expand Down Expand Up @@ -368,7 +363,8 @@ def test_edit_sshkeyfile(isolated_filesystem, qpc_server_config):
.format(name, new_sshkeyfile.name)
)
qpc_cred_edit.logfile = BytesIO()
assert qpc_cred_edit.expect('Credential \'{}\' updated'.format(name)) == 0
assert qpc_cred_edit.expect(
'Credential "{}" was updated'.format(name)) == 0
assert qpc_cred_edit.expect(pexpect.EOF) == 0
qpc_cred_edit.close()
assert qpc_cred_edit.exitstatus == 0
Expand Down Expand Up @@ -416,8 +412,6 @@ def test_edit_sshkeyfile_negative(isolated_filesystem, qpc_server_config):
assert qpc_cred_edit.exitstatus != 0


@pytest.mark.xfail(
reason='https://github.com/quipucords/quipucords/issues/330')
def test_edit_sudo_password(isolated_filesystem, qpc_server_config):
"""Edit an auth's sudo password.
Expand Down Expand Up @@ -460,7 +454,8 @@ def test_edit_sudo_password(isolated_filesystem, qpc_server_config):
)
assert qpc_cred_edit.expect(SUDO_PASSWORD_INPUT) == 0
qpc_cred_edit.sendline(new_sudo_password)
assert qpc_cred_edit.expect('Credential \'{}\' updated'.format(name)) == 0
assert qpc_cred_edit.expect(
'Credential "{}" was updated'.format(name)) == 0
assert qpc_cred_edit.expect(pexpect.EOF) == 0
qpc_cred_edit.close()
assert qpc_cred_edit.exitstatus == 0
Expand Down

0 comments on commit 8d7ab2b

Please sign in to comment.