Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions .github/actions/contract-tests/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,12 @@ inputs:
description: 'Github token, used for contract tests'
required: false
default: ''
test_harness_params:
description: 'Optional extra parameters for the SDK test harness (e.g. -enable-long-running-tests). Passed as TEST_HARNESS_PARAMS to make.'
test_harness_params_v2:
description: 'Optional extra parameters for the SDK test harness v2. Passed as TEST_HARNESS_PARAMS_V2 to make.'
required: false
default: ''
test_harness_params_v3:
description: 'Optional extra parameters for the SDK test harness v3 (e.g. -enable-long-running-tests). Passed as TEST_HARNESS_PARAMS_V3 to make.'
required: false
default: ''

Expand All @@ -18,4 +22,4 @@ runs:
steps:
- name: Run contract tests
shell: bash
run: make contract-tests -C ${{ inputs.workspace_path }} TEST_HARNESS_PARAMS="${{ inputs.test_harness_params }}"
run: make contract-tests -C ${{ inputs.workspace_path }} TEST_HARNESS_PARAMS_V2="${{ inputs.test_harness_params_v2 }}" TEST_HARNESS_PARAMS_V3="${{ inputs.test_harness_params_v3 }}"
2 changes: 1 addition & 1 deletion .github/workflows/nightly-contract-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
with:
workspace_path: 'lib/sdk/server'
token: ${{ secrets.GITHUB_TOKEN }}
test_harness_params: '-enable-long-running-tests'
test_harness_params_v3: '-enable-long-running-tests'

notify-slack-on-failure:
runs-on: ubuntu-latest
Expand Down
11 changes: 6 additions & 5 deletions lib/sdk/server/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ SUPPRESSION_FILE=contract-tests/test-suppressions.txt
SUPPRESSION_FILE_FDV2=contract-tests/test-suppressions-fdv2.txt

# Add any extra sdk-test-harness parameters here, such as -skip for tests that are
# temporarily not working.
TEST_HARNESS_PARAMS=
# v2 and v3 params are separated because v3 supports additional parameters that v2 does not.
TEST_HARNESS_PARAMS_V2=
TEST_HARNESS_PARAMS_V3=

build-contract-tests:
@cd contract-tests && ../gradlew installDist
Expand All @@ -30,10 +31,10 @@ start-contract-test-service-bg:
run-contract-tests:
@echo "Running SDK contract test v2..."
@curl -s https://raw.githubusercontent.com/launchdarkly/sdk-test-harness/v2/downloader/run.sh \
| VERSION=v2 PARAMS="-url http://localhost:$(TEST_SERVICE_PORT) -debug -skip-from=$(SUPPRESSION_FILE) $(TEST_HARNESS_PARAMS)" sh
@echo "Running SDK contract test v3.0.0-alpha.1..."
| VERSION=v2 PARAMS="-url http://localhost:$(TEST_SERVICE_PORT) -debug -skip-from=$(SUPPRESSION_FILE) $(TEST_HARNESS_PARAMS_V2)" sh
@echo "Running SDK contract test v3..."
@curl -s https://raw.githubusercontent.com/launchdarkly/sdk-test-harness/v3.0.0-alpha.3/downloader/run.sh \
| VERSION=v3.0.0-alpha.3 PARAMS="-url http://localhost:$(TEST_SERVICE_PORT) -debug -stop-service-at-end -skip-from=$(SUPPRESSION_FILE_FDV2) $(TEST_HARNESS_PARAMS)" sh
| VERSION=v3.0.0-alpha.3 PARAMS="-url http://localhost:$(TEST_SERVICE_PORT) -debug -stop-service-at-end -skip-from=$(SUPPRESSION_FILE_FDV2) $(TEST_HARNESS_PARAMS_V3)" sh

contract-tests: build-contract-tests start-contract-test-service-bg run-contract-tests

Expand Down