Skip to content

Commit

Permalink
test: fix TDS 8.0 test cases not being executed correctly (#1565)
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelSun90 authored Aug 4, 2023
1 parent b78df14 commit 2b27531
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions test/integration/connection-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,10 @@ describe('Encrypt Test', function() {
* @param {(err: Error | null, supportsTds8?: boolean) => void} callback
*/
function supportsTds8(config, callback) {
if (config.options.tdsVersion < '7_2') {
return callback(null, false);
}

const connection = new Connection(config);

connection.connect((err) => {
Expand All @@ -549,12 +553,12 @@ describe('Encrypt Test', function() {
return callback(err);
}

if (!productMajorVersion || productMajorVersion < '2022') {
if (!productMajorVersion || productMajorVersion < '16') {
connection.close();
return callback(null, false);
}

if (productMajorVersion > '2022') {
if (productMajorVersion > '16') {
connection.close();
return callback(null, true);
}
Expand Down

0 comments on commit 2b27531

Please sign in to comment.