Skip to content

Commit

Permalink
Adding default timeout tests, remove failure on no timeout provided test
Browse files Browse the repository at this point in the history
  • Loading branch information
Soren Ptak committed Jul 20, 2023
1 parent 68a4436 commit f555c64
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,26 +101,33 @@ jobs:
success-exit-code: 0
timeout-seconds: 75

- name: API Test | Failure Case | Executable Monitor | Retries, No Success Line, No Exit Code
continue-on-error: true
id: test-executable-monitor-API-no-success-metric
- name: API Test | Success Case | Executable Monitor | Retries, Success Line, No Exit Code, Use Default Timeout
id: test-executable-monitor-action-no-exit-code-no-timeout
uses: ./executable-monitor
with:
exe-path: executable-monitor/test.out
log-dir: demo_run_logs
timeout-seconds: 20
success-line: "Sleeping for 6 seconds"
retry-attempts: 2

- name: API Test | Failure Case | Executable Monitor | No Timeout
continue-on-error: true
id: test-executable-monitor-API-no-timeout

- name: API Test | Success Case | Executable Monitor | Retries, No Success Line, Exit Code, Use Default Timeout
id: test-executable-monitor-action-no-success-line-no-timeout
uses: ./executable-monitor
with:
exe-path: executable-monitor/test.out
log-dir: demo_run_logs
success-line: "Sleeping for 6 seconds"
success-exit-code: 0
retry-attempts: 2

- name: API Test | Failure Case | Executable Monitor | Retries, No Success Line, No Exit Code
continue-on-error: true
id: test-executable-monitor-API-no-success-metric
uses: ./executable-monitor
with:
exe-path: executable-monitor/test.out
log-dir: demo_run_logs
timeout-seconds: 20
retry-attempts: 2

- name: API Test | Failure Case | Executable Monitor | No Log Dir
continue-on-error: true
Expand Down Expand Up @@ -156,13 +163,6 @@ jobs:
echo -e "\033[32;31mtest-executable-monitor-API-no-success-metric had unexpected '${{ steps.test-executable-monitor-API-no-success-metric.outcome}}' exit condition\033[0m"
exit 1
fi
if [ "${{ steps.test-executable-monitor-API-no-timeout.outcome}}" = "failure" ]; then
echo -e "\033[32;3mtest-executable-monitor-API-no-timeout had outcome '${{ steps.test-executable-monitor-API-no-timeout.outcome}}' as intended\033[0m"
else
echo "::endgroup::"
echo -e "\033[32;31mtest-executable-monitor-API-no-timeout had unexpected '${{ steps.test-executable-monitor-API-no-timeout.outcome}}' exit condition\033[0m"
exit 1
fi
if [ "${{ steps.test-executable-monitor-API-no-log-dir.outcome}}" = "failure" ]; then
echo -e "\033[32;3mtest-executable-monitor-API-no-log-dir had outcome '${{ steps.test-executable-monitor-API-no-log-dir.outcome}}' as intended\033[0m"
else
Expand Down

0 comments on commit f555c64

Please sign in to comment.