Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
unkcpz committed Sep 5, 2023
1 parent 0e6f26b commit b1bc7dc
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,9 @@ def test_add_remove_profile():
assert result.exit_code == 0
assert "Added profile 'new-profile'." in result.output

# Add second profile to be clean with delete volume
runner.invoke(cli.cli, ["profile", "add", "second-profile"], input="n\n")

# Check that new-profile exists
result: Result = runner.invoke(cli.cli, ["profile", "list"])
assert "new-profile" in result.output
Expand Down Expand Up @@ -138,6 +141,10 @@ def test_add_remove_profile():
assert result.exit_code == 1
assert "Profile with name 'new-profile' does not exist." in result.output

# Remove second-profile with reset (`--purge` option)
result: Result = runner.invoke(cli.cli, ["profile", "remove", "--purge", "second-profile"], input="second-profile\ny\n")
assert result.exit_code == 0
assert "Please enter the name of the profile to continue" in result.output

def test_add_profile_invalid_name():
runner: CliRunner = CliRunner()
Expand Down

0 comments on commit b1bc7dc

Please sign in to comment.