Skip to content

Commit 829383e

Browse files
committed
ci: workaround contract test breakage
1 parent 41edc61 commit 829383e

File tree

2 files changed

+6
-15
lines changed

2 files changed

+6
-15
lines changed

.github/workflows/server-node.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,16 @@ jobs:
3838
- name: Launch the test service in the background
3939
run: yarn contract-test-service 2>&1 &
4040
- name: Clone and run contract tests from feat/fdv2 branch
41+
# NOTE: This is a temporary workaround to run the contract tests from the feat/fdv2 branch.
42+
# The commit hash is a few commits before the HEAD of the feat/fdv2 branch. We do this because
43+
# the HEAD of the feat/fdv2 branch requires the synchronizers be passed as a list which is not
44+
# implemented yet. (SDK-1798)
4145
run: |
4246
mkdir -p /tmp/sdk-test-harness
4347
git clone https://github.com/launchdarkly/sdk-test-harness.git /tmp/sdk-test-harness
4448
cp ./contract-tests/testharness-suppressions-fdv2.txt /tmp/sdk-test-harness/testharness-suppressions-fdv2.txt
4549
cd /tmp/sdk-test-harness
46-
git checkout feat/fdv2
50+
git checkout de833af990da23a89b66c5366809b5be8c27e3f8
4751
go build -o test-harness .
4852
./test-harness -url http://localhost:8000 -debug --skip-from=testharness-suppressions-fdv2.txt
4953
env:

contract-tests/src/sdkClientEntity.ts

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -328,22 +328,9 @@ export async function newSdkClientEntity(options: any): Promise<SdkClientEntity>
328328
options.configuration.startWaitTimeMs !== undefined
329329
? options.configuration.startWaitTimeMs
330330
: 5000;
331-
332-
333-
// TODO: synchronizer should be a list, but for this is a temporary workaround
334-
// so that we can pass the contract tests in a more reasonable manner.
335-
// SDK-1798
336-
const adaptedConfigs = {
337-
...options.configuration,
338-
};
339-
340-
adaptedConfigs.dataSystem.synchronizers = {
341-
primary: options.configuration.dataSystem.synchronizers?.[0],
342-
secondary: options.configuration.dataSystem.synchronizers?.[1],
343-
}
344331
const client: LDClient = ld.init(
345332
options.configuration.credential || 'unknown-sdk-key',
346-
makeSdkConfig(adaptedConfigs, options.tag),
333+
makeSdkConfig(options.configuration, options.tag),
347334
);
348335
try {
349336
await client.waitForInitialization({ timeout });

0 commit comments

Comments
 (0)