-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* worker: allow steps to specify their own adaptor version * worker: fix a couple of issues auto-loading the collections version * changeset * Readme * version: [email protected] * tests: fix integration test
- Loading branch information
1 parent
e0e19b2
commit 21b66c4
Showing
9 changed files
with
76 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"name": "@openfn/integration-tests-worker", | ||
"private": true, | ||
"version": "1.0.64", | ||
"version": "1.0.65", | ||
"description": "Lightning WOrker integration tests", | ||
"author": "Open Function Group <[email protected]>", | ||
"license": "ISC", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -614,7 +614,36 @@ test('append the collections adaptor to jobs that use it', (t) => { | |
t.deepEqual(b.adaptors, ['common', '@openfn/[email protected]']); | ||
}); | ||
|
||
test('append the collections credential to jobs that use it', (t) => { | ||
test('do not append the collections adaptor to jobs that already have it', (t) => { | ||
const run: Partial<LightningPlan> = { | ||
id: 'w', | ||
jobs: [ | ||
createNode({ | ||
id: 'a', | ||
body: 'collections.each("c", "k", (state) => state)', | ||
adaptor: '@openfn/language-collections@latest', | ||
}), | ||
], | ||
triggers: [{ id: 't', type: 'cron' }], | ||
edges: [createEdge('t', 'a')], | ||
}; | ||
|
||
const { plan } = convertPlan(run as LightningPlan, { | ||
collectionsVersion: '1.0.0', | ||
}); | ||
|
||
const [_t, a] = plan.workflow.steps; | ||
|
||
// @ts-ignore | ||
t.deepEqual(a.adaptors, ['@openfn/language-collections@latest']); | ||
|
||
t.deepEqual(plan.workflow.credentials, { | ||
collections_token: true, | ||
collections_endpoint: true, | ||
}); | ||
}); | ||
|
||
test('append the collections credential to workflows that use it', (t) => { | ||
const run: Partial<LightningPlan> = { | ||
id: 'w', | ||
jobs: [ | ||
|