This repository has been archived by the owner on Sep 6, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add docker-compose mock test * Update yarn.lock * Add platform linux/amd64 * Update endpoint * Remove mockserver and test via configurable connection * Revert yarn.lock * Update yarn.lock * Add additional secrets to CI.yml * Update CI.yml * Update docker run command in CI.yml * Revert test-linux-aarch64-gnu-binding docker run command * Update CI.yml * Remove quote around test-linux-aarch64-gnu-binding run options * Add logs in test * Update form of environment variables passed in CI.yml * Remove test logs * Update README.md
- Loading branch information
Showing
10 changed files
with
140 additions
and
91 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
INTEGRATIONOS_SECRET_KEY= | ||
INTEGRATIONOS_CONNECTION_KEY= | ||
INTEGRATIONOS_TESTING_MODEL= |
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 |
---|---|---|
@@ -1,15 +1,28 @@ | ||
import('dotenv/config'); | ||
import test from 'ava' | ||
|
||
import { IntegrationOS } from '../index.js' | ||
|
||
test.before(t => { | ||
const requiredEnvVars = [ | ||
'INTEGRATIONOS_SECRET_KEY', | ||
'INTEGRATIONOS_CONNECTION_KEY', | ||
'INTEGRATIONOS_TESTING_MODEL' | ||
]; | ||
|
||
test('fetch customer', async (t) => { | ||
|
||
const integrate = new IntegrationOS("sk_test_1_5wOEHNTqN8h6R7ErKHg_p9OPK1JE9AHPO3LrSUcmmIC-uZnKv1Z7ijPE2YrsURTS-830GyV_vQQhZeHG_Gc6Vd9A5SsJGg4Es5RqjjUoMQsDw8uWobpbCtBoAVsic08BFG6kf557lrytTGIo7563ikQfUqUfE2aO_ILg5tbYyZYZBMHd46GRTRwfa0_PhjhCFCpXnPE", { | ||
serverUrl: "https://development-api.integrationos.com/v1/unified/" | ||
requiredEnvVars.forEach(envVar => { | ||
if (!process.env[envVar]) { | ||
t.fail(`${envVar} is not set`); | ||
} | ||
}); | ||
}); | ||
|
||
test('List model entities', async (t) => { | ||
const integrate = new IntegrationOS(process.env.INTEGRATIONOS_SECRET_KEY); | ||
|
||
let response = await integrate.customers("test::shopify::andrew-test-0d1866cc98").list(); | ||
let response = await integrate[process.env.INTEGRATIONOS_TESTING_MODEL](process.env.INTEGRATIONOS_CONNECTION_KEY).list(); | ||
|
||
t.truthy(response.unified.length) | ||
t.truthy(response.unified) | ||
t.truthy(response.meta) | ||
t.truthy(response.headers) | ||
}) |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -41,5 +41,8 @@ | |
"postbuild": "sed -i'' -e 's/<Type>//g' index.js && sed -i'' -e '/^export type*/d' index.d.ts", | ||
"prepublishOnly": "napi prepublish -t npm" | ||
}, | ||
"packageManager": "[email protected]" | ||
"packageManager": "[email protected]", | ||
"dependencies": { | ||
"dotenv": "^16.4.5" | ||
} | ||
} |
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
Oops, something went wrong.