Skip to content

Commit

Permalink
Add manual test script for connectAsync (#598)
Browse files Browse the repository at this point in the history
* Add manual test script for connectAsync

* Use env var instead of python script

* Moved the skipped test in testConnection to testManualConnection.js

* remove 'skip' in the key pair test, and revised the 'manual test' script to use testManualConnection.

---------

Co-authored-by: sfc-gh-ext-simba-jy <[email protected]>
  • Loading branch information
1 parent 63ea42a commit ee8e09e
Show file tree
Hide file tree
Showing 4 changed files with 575 additions and 688 deletions.
23 changes: 21 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ npm test
```
or
```
npm test:unit
npm run test:unit
```

To run single test file use `test:single` script, e.g. run tests in `test/unit/snowflake_test.js` only:
Expand All @@ -68,7 +68,26 @@ npm run test:single -- test/unit/snowflake_test.js

Run integration tests:
```
npm test:integration
npm run test:integration
```

Manual test
----------------------------------------------------------------------

Specify env variables:

```
export RUN_MANUAL_TESTS_ONLY=true
export SNOWFLAKE_TEST_OKTA_USER=<your_okta_user>
export SNOWFLAKE_TEST_OKTA_PASS=<your_okta_password>
export SNOWFLAKE_TEST_OKTA_AUTH=<your_okta_auth>
export SNOWFLAKE_TEST_OAUTH_TOKEN=<your_oauth_accesstoken>
export SNOWFLAKE_TEST_BROWSER_USER=<your_browser_user>
```

Run manual connection test for different authenticators
```
npm run test:manual
```

Getting the code coverage
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,13 @@
"test:ci": "mocha -timeout 180000 --recursive --full-trace test/**/*.js",
"test:ci:coverage": "nyc npm run test:ci",
"test:ci:withSystemTests": "mocha -timeout 180000 --recursive --full-trace test/**/*.js system_test/*.js",
"test:ci:withSystemTests:coverage": "nyc npm run test:ci:withSystemTests"
"test:ci:withSystemTests:coverage": "nyc npm run test:ci:withSystemTests",
"test:manual": "mocha -timeout 180000 --full-trace --full-trace test/integration/testManualConnection.js"
},
"author": {
"name": "Snowflake Computing, Inc.",
"email": "[email protected]",
"url": "https://www.snowflake.com/"
},
"license": "Apache-2.0"
}
}
Loading

0 comments on commit ee8e09e

Please sign in to comment.