Skip to content
This repository has been archived by the owner on Jul 12, 2022. It is now read-only.

Commit

Permalink
test: add functional tests for error cases in credential commands
Browse files Browse the repository at this point in the history
Signed-off-by: dittrichlucas <[email protected]>
  • Loading branch information
dittrichlucas committed Oct 27, 2021
1 parent 5580033 commit 25bbf61
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 2 deletions.
64 changes: 62 additions & 2 deletions .github/workflows/test-credential-commands.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,27 @@ jobs:
command_line: rit list credential
assert_file_path: testdata/gha_workflows/credential_workflow/assert1.txt
expected_result: PASSED

- name: RIT SET CREDENTIAL command ERROR (3)
uses: GuillaumeFalourd/test-cli-commands-action@v1
with:
command_line: rit set credential --flag=test
assert_file_path: testdata/gha_workflows/credential_workflow/assert3.txt
expected_result: PASSED
specific_line: 1
- name: RIT DELETE CREDENTIAL command ERROR (4)
uses: GuillaumeFalourd/test-cli-commands-action@v1
with:
command_line: rit delete credential --flag=test
assert_file_path: testdata/gha_workflows/credential_workflow/assert3.txt
expected_result: PASSED
specific_line: 1
- name: RIT DELETE CREDENTIAL command ERROR (5)
uses: GuillaumeFalourd/test-cli-commands-action@v1
with:
command_line: rit delete credential --env=new_test
contains: no such file or directory
expected_result: PASSED

macos:
runs-on: macos-latest
steps:
Expand Down Expand Up @@ -117,7 +137,27 @@ jobs:
command_line: rit list credential
assert_file_path: testdata/gha_workflows/credential_workflow/assert1.txt
expected_result: PASSED

- name: RIT SET CREDENTIAL command ERROR (3)
uses: GuillaumeFalourd/test-cli-commands-action@v1
with:
command_line: rit set credential --flag=test
assert_file_path: testdata/gha_workflows/credential_workflow/assert3.txt
expected_result: PASSED
specific_line: 1
- name: RIT DELETE CREDENTIAL command ERROR (4)
uses: GuillaumeFalourd/test-cli-commands-action@v1
with:
command_line: rit delete credential --flag=test
assert_file_path: testdata/gha_workflows/credential_workflow/assert3.txt
expected_result: PASSED
specific_line: 1
- name: RIT DELETE CREDENTIAL command ERROR (5)
uses: GuillaumeFalourd/test-cli-commands-action@v1
with:
command_line: rit delete credential --env=new_test
contains: no such file or directory
expected_result: PASSED

windows:
runs-on: windows-latest
steps:
Expand Down Expand Up @@ -153,3 +193,23 @@ jobs:
command_line: ./rit.exe list credential
assert_file_path: testdata/gha_workflows/credential_workflow/assert1.txt
expected_result: PASSED
- name: RIT SET CREDENTIAL command ERROR (3)
uses: GuillaumeFalourd/test-cli-commands-action@v1
with:
command_line: ./rit.exe set credential --flag=test
assert_file_path: testdata/gha_workflows/credential_workflow/assert3.txt
expected_result: PASSED
specific_line: 1
- name: RIT DELETE CREDENTIAL command ERROR (4)
uses: GuillaumeFalourd/test-cli-commands-action@v1
with:
command_line: ./rit.exe delete credential --flag=test
assert_file_path: testdata/gha_workflows/credential_workflow/assert3.txt
expected_result: PASSED
specific_line: 1
- name: RIT DELETE CREDENTIAL command ERROR (5)
uses: GuillaumeFalourd/test-cli-commands-action@v1
with:
command_line: ./rit.exe delete credential --env=new_test
contains: no such file or directory
expected_result: PASSED
1 change: 1 addition & 0 deletions testdata/gha_workflows/credential_workflow/assert3.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Error: unknown flag: --flag

0 comments on commit 25bbf61

Please sign in to comment.