Skip to content

Commit

Permalink
feat: Add option to enable persistent store test support (#47)
Browse files Browse the repository at this point in the history
  • Loading branch information
keelerm84 authored Oct 31, 2024
1 parent 44b1478 commit a6e3543
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 10 deletions.
19 changes: 10 additions & 9 deletions actions/contract-tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,15 @@ jobs:
# Options
| Name | Description | Default |
|---------------------|------------------------------------------------------------|------------------------------------|
| `repo` | Which tests to run (git repo) | `sdk-test-harness` (see below [1]) |
| `version` | Version of the tests | `v2` |
| `test_service_port` | Port the test service (your SDK) is running on. | `8123` |
| `test_harness_port` | Port the test harness is running on. | `8111` |
| `debug_logging` | Whether the test harness should emit debug logs | `false` |
| `extra_params` | Any other params that should be passed to the test harness | None. |
| `token` | Github token, if available. Helps avoid ratelimiting. | None. |
| Name | Description | Default |
|----------------------------|------------------------------------------------------------|------------------------------------|
| `repo` | Which tests to run (git repo) | `sdk-test-harness` (see below [1]) |
| `version` | Version of the tests | `v2` |
| `test_service_port` | Port the test service (your SDK) is running on. | `8123` |
| `test_harness_port` | Port the test harness is running on. | `8111` |
| `enable_persistence_tests` | Enables persistent store test support. | `false` |
| `debug_logging` | Whether the test harness should emit debug logs | `false` |
| `extra_params` | Any other params that should be passed to the test harness | None. |
| `token` | Github token, if available. Helps avoid ratelimiting. | None. |

[1] For Server-Sent-Event tests, use [`sse-contract-tests`](https://github.com/launchdarkly/sse-contract-tests).
6 changes: 5 additions & 1 deletion actions/contract-tests/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ inputs:
required: false
description: "Port of the test harness."
default: '8111'
enable_persistence_tests:
required: false
description: "Whether or not to enable support for persistence tests"
default: true
debug_logging:
description: "Whether the test harness should print debug logs for failed tests."
required: false
Expand All @@ -47,4 +51,4 @@ runs:
# The token is then passed to the downloader script itself, so it can perform more API requests and hopefully avoid rate limiting again.
GITHUB_TOKEN: ${{ inputs.token }}
VERSION: ${{ inputs.version }}
PARAMS: -url http://localhost:${{ inputs.test_service_port }} -port ${{ inputs.test_harness_port }} ${{ inputs.extra_params }} ${{ inputs.debug_logging == 'true' && '-debug' || '' }} -stop-service-at-end
PARAMS: -url http://localhost:${{ inputs.test_service_port }} -port ${{ inputs.test_harness_port }} ${{ inputs.extra_params }} ${{ inputs.enable_persistence_tests == 'true' && '-enable-persistence-tests' || '' }} ${{ inputs.debug_logging == 'true' && '-debug' || '' }} -stop-service-at-end

0 comments on commit a6e3543

Please sign in to comment.