Skip to content

Commit

Permalink
Merge pull request #58 from snowflakedb/prep-1.3.1
Browse files Browse the repository at this point in the history
Prep 1.3.1
  • Loading branch information
ankit-bhatnagar167 authored Sep 30, 2019
2 parents c457a8e + 64fe368 commit 673eb50
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 27 deletions.
3 changes: 1 addition & 2 deletions lib/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,6 @@ if (nodeJSVersion && nodeJSVersion.startsWith('v'))
}
// user-agent HTTP header
const userAgent = 'JavaScript' + '/' + driverVersion
+ '/' + 'NodeJS' + '/' + nodeJSVersion
+ '/' + process.platform + '-' + process.arch;
+ ' (' + process.platform + '-' + process.arch + ') ' + 'NodeJS' + '/' + nodeJSVersion;

exports.userAgent = userAgent;
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "snowflake-sdk",
"version": "1.3.0",
"version": "1.3.1",
"description": "Node.js driver for Snowflake",
"dependencies": {
"agent-base": "^2.1.1",
Expand Down
2 changes: 1 addition & 1 deletion scripts/hang_webserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ def do_POST(self):
self.send_header('Content-Type', 'text/plain')
self.end_headers()
elif self.path.startswith('/hang'):
time.sleep(300)
self.send_response(200, 'OK')
self.send_header('Content-Type', 'text/plain')
self.end_headers()
time.sleep(300)
else:
self.send_response(200, 'OK')
self.send_header('Content-Type', 'text/plain')
Expand Down
25 changes: 2 additions & 23 deletions test/integration/testConnectionWithOCSP.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ describe('Connection with OCSP test', function ()
{
deleteCache();
SocketUtil.variables.OCSP_RESPONSE_CACHE = undefined;
SocketUtil.variables.SF_OCSP_FORCE_OCSP_VALIDATE = true;
SocketUtil.variables.SF_OCSP_RESPONSE_CACHE_SERVER_ENABLED = false;
// inject validity error
process.env.SF_OCSP_TEST_INJECT_VALIDITY_ERROR = 'true';
Expand Down Expand Up @@ -101,7 +100,6 @@ describe('Connection with OCSP test', function ()
{
deleteCache();
SocketUtil.variables.OCSP_RESPONSE_CACHE = undefined;
SocketUtil.variables.SF_OCSP_FORCE_OCSP_VALIDATE = true;
SocketUtil.variables.SF_OCSP_RESPONSE_CACHE_SERVER_ENABLED = false;
// inject validity error
process.env.SF_OCSP_TEST_INJECT_VALIDITY_ERROR = 'true';
Expand Down Expand Up @@ -134,7 +132,6 @@ describe('Connection with OCSP test', function ()
{
deleteCache();
SocketUtil.variables.OCSP_RESPONSE_CACHE = undefined;
SocketUtil.variables.SF_OCSP_FORCE_OCSP_VALIDATE = true;
SocketUtil.variables.SF_OCSP_RESPONSE_CACHE_SERVER_ENABLED = false;
// inject validity error
process.env.SF_OCSP_TEST_INJECT_UNKNOWN_STATUS = 'true';
Expand Down Expand Up @@ -165,7 +162,6 @@ describe('Connection with OCSP test', function ()
{
deleteCache();
SocketUtil.variables.OCSP_RESPONSE_CACHE = undefined;
SocketUtil.variables.SF_OCSP_FORCE_OCSP_VALIDATE = true;
SocketUtil.variables.SF_OCSP_RESPONSE_CACHE_SERVER_ENABLED = false;
// inject validity error
process.env.SF_OCSP_TEST_INJECT_UNKNOWN_STATUS = 'true';
Expand Down Expand Up @@ -197,7 +193,7 @@ describe('Connection with OCSP test', function ()
done
);
});

/*
it('OCSP Revoked Cert - Fail Open', function (done)
{
snowflake.configure({ocspFailOpen: true});
Expand Down Expand Up @@ -239,13 +235,12 @@ describe('Connection with OCSP test', function ()
],
done
);
});
});*/

it('OCSP Cache Server Timeout - Fail Open', function (done)
{
deleteCache();
SocketUtil.variables.OCSP_RESPONSE_CACHE = undefined;
SocketUtil.variables.SF_OCSP_FORCE_OCSP_VALIDATE = true;
// cache server is used
SocketUtil.variables.SF_OCSP_RESPONSE_CACHE_SERVER_ENABLED = true;
// fake OCSP responder.
Expand Down Expand Up @@ -282,7 +277,6 @@ describe('Connection with OCSP test', function ()
{
deleteCache();
SocketUtil.variables.OCSP_RESPONSE_CACHE = undefined;
SocketUtil.variables.SF_OCSP_FORCE_OCSP_VALIDATE = true;
// cache server is used
SocketUtil.variables.SF_OCSP_RESPONSE_CACHE_SERVER_ENABLED = true;
// fake OCSP responder.
Expand Down Expand Up @@ -323,7 +317,6 @@ describe('Connection with OCSP test', function ()
{
deleteCache();
SocketUtil.variables.OCSP_RESPONSE_CACHE = undefined;
SocketUtil.variables.SF_OCSP_FORCE_OCSP_VALIDATE = true;
// no cache server is used
SocketUtil.variables.SF_OCSP_RESPONSE_CACHE_SERVER_ENABLED = false;
// fake OCSP responder.
Expand Down Expand Up @@ -360,7 +353,6 @@ describe('Connection with OCSP test', function ()
{
deleteCache();
SocketUtil.variables.OCSP_RESPONSE_CACHE = undefined;
SocketUtil.variables.SF_OCSP_FORCE_OCSP_VALIDATE = true;
// no cache server is used
SocketUtil.variables.SF_OCSP_RESPONSE_CACHE_SERVER_ENABLED = false;
// fake OCSP responder.
Expand Down Expand Up @@ -405,7 +397,6 @@ describe('Connection with OCSP test', function ()
{
deleteCache();
SocketUtil.variables.OCSP_RESPONSE_CACHE = undefined;
SocketUtil.variables.SF_OCSP_FORCE_OCSP_VALIDATE = true;
// no cache server is used
SocketUtil.variables.SF_OCSP_RESPONSE_CACHE_SERVER_ENABLED = true;
// fake OCSP responder.
Expand Down Expand Up @@ -444,7 +435,6 @@ describe('Connection with OCSP test', function ()
{
deleteCache();
SocketUtil.variables.OCSP_RESPONSE_CACHE = undefined;
SocketUtil.variables.SF_OCSP_FORCE_OCSP_VALIDATE = true;
// no cache server is used
SocketUtil.variables.SF_OCSP_RESPONSE_CACHE_SERVER_ENABLED = false;
// fake OCSP responder.
Expand Down Expand Up @@ -487,7 +477,6 @@ describe('Connection with OCSP test', function ()
{
deleteCache();
SocketUtil.variables.OCSP_RESPONSE_CACHE = undefined;
SocketUtil.variables.SF_OCSP_FORCE_OCSP_VALIDATE = true;
// no cache server is used
SocketUtil.variables.SF_OCSP_RESPONSE_CACHE_SERVER_ENABLED = false;
// fake OCSP responder.
Expand Down Expand Up @@ -521,7 +510,6 @@ describe('Connection with OCSP test', function ()
{
deleteCache();
SocketUtil.variables.OCSP_RESPONSE_CACHE = undefined;
SocketUtil.variables.SF_OCSP_FORCE_OCSP_VALIDATE = true;
// no cache server is used
SocketUtil.variables.SF_OCSP_RESPONSE_CACHE_SERVER_ENABLED = false;
// fake OCSP responder.
Expand Down Expand Up @@ -557,15 +545,6 @@ describe('Connection with OCSP test', function ()
});

const testInvalidCertConnectionOptions = [
{
connectString: {
accessUrl: 'https://untrusted-root.badssl.com',
username: 'fakeuser',
password: 'fakepasword',
account: 'fakeaccount',
},
errorCode: 'SELF_SIGNED_CERT_IN_CHAIN'
},
{
connectString: {
accessUrl: 'https://expired.badssl.com',
Expand Down

0 comments on commit 673eb50

Please sign in to comment.