Skip to content

Commit

Permalink
SNOW-929946: Uncomment revoked cert tests and skip them
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-dprzybysz committed Oct 4, 2023
1 parent 05f8595 commit 914553a
Showing 1 changed file with 29 additions and 31 deletions.
60 changes: 29 additions & 31 deletions test/integration/testConnectionWithOCSP.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ const testConnectionOptions = {
sfRetryMaxLoginRetries: 2
};

// const testRevokedConnectionOptions = {
// accessUrl: 'https://revoked.badssl.com',
// username: 'fakeuser',
// password: 'fakepasword',
// account: 'fakeaccount'
// };
const testRevokedConnectionOptions = {
accessUrl: 'https://revoked.badssl.com',
username: 'fakeuser',
password: 'fakepasword',
account: 'fakeaccount'
};

function getConnectionOptions() {
// use unique hostname to avoid connection cache in tests.
Expand Down Expand Up @@ -149,37 +149,35 @@ describe('Connection with OCSP test', function () {
}
});
});
/*
it('OCSP Revoked Cert - Fail Open', function (done)
{

// TODO SNOW-930797 Fix and enable Revoked Cert tests
it.skip('OCSP Revoked Cert - Fail Open', function (done) {
const connection = snowflake.createConnection(testRevokedConnectionOptions);

connection.connect(function (err)
{
try {
assert.strictEqual(err.cause.code, Errors.codes.ERR_OCSP_REVOKED);
done();
} catch (error) {
done(error);
}
});
connection.connect(function (err) {
try {
assert.strictEqual(err.cause.code, Errors.codes.ERR_OCSP_REVOKED);
done();
} catch (error) {
done(error);
}
});
});

it('OCSP Revoked Cert - Fail Closed', function (done)
{
snowflake.configure({ocspFailOpen: false});
// TODO SNOW-930797 Fix and enable Revoked Cert tests
it.skip('OCSP Revoked Cert - Fail Closed', function (done) {
snowflake.configure({ ocspFailOpen: false });
const connection = snowflake.createConnection(testRevokedConnectionOptions);

connection.connect(function (err)
{
try {
assert.strictEqual(err.cause.code, Errors.codes.ERR_OCSP_REVOKED);
done();
} catch (error) {
done(error);
}
});
});*/
connection.connect(function (err) {
try {
assert.strictEqual(err.cause.code, Errors.codes.ERR_OCSP_REVOKED);
done();
} catch (error) {
done(error);
}
});
});

it('OCSP Cache Server Timeout - Fail Open', function (done) {
// cache server is used
Expand Down

0 comments on commit 914553a

Please sign in to comment.