From 09f30b2502af793c06197cb8d5dbb37951c90d2b Mon Sep 17 00:00:00 2001 From: Dominic Pelini <111786059+DomPeliniAerospike@users.noreply.github.com> Date: Thu, 2 Nov 2023 12:36:55 -0600 Subject: [PATCH] Disabled blob sindex testing on server versions less than 7.0 Disabled blob sindex testing on server versions less than 7.0 --- test/query.js | 56 ++++++++++++++++++++++++++------------------------- 1 file changed, 29 insertions(+), 27 deletions(-) diff --git a/test/query.js b/test/query.js index d0ae87b7..f3a541ab 100644 --- a/test/query.js +++ b/test/query.js @@ -141,33 +141,35 @@ describe('Queries', function () { ['qidxAggregateMapDoubleNested', 'nested', STRING, MAPKEYS, new Context().addMapKey('doubleNested')] ] - describe('server version 7.0.0 and later', function () { - helper.skipUnlessVersion('>= 7.0.0', this) - context('Adds blob records and indexes', function () { - samples.push({ name: 'blob match', blob: Buffer.from('guava') }) - samples.push({ name: 'blob non-match', blob: Buffer.from('pumpkin') }) - samples.push({ name: 'blob list match', lblob: [Buffer.from('guava'), Buffer.from('papaya')] }) - samples.push({ name: 'blob list non-match', lblob: [Buffer.from('pumpkin'), Buffer.from('turnip')] }) - samples.push({ name: 'blob map match', mblob: { a: Buffer.from('guava'), b: Buffer.from('papaya') } }) - samples.push({ name: 'blob map non-match', mblob: { a: Buffer.from('pumpkin'), b: Buffer.from('turnip') } }) - samples.push({ name: 'blob mapkeys match', mkblob: new Map([[Buffer.from('guava'), 1], [Buffer.from('papaya'), 2]]) }) - samples.push({ name: 'blob mapkeys non-match', mkblob: new Map([[Buffer.from('pumpkin'), 3], [Buffer.from('turnip'), 4]]) }) - samples.push({ name: 'nested blob match', blob: { nested: Buffer.from('guava') } }) - samples.push({ name: 'nested blob non-match', blob: { nested: Buffer.from('pumpkin') } }) - samples.push({ name: 'nested blob list match', lblob: { nested: [Buffer.from('guava'), Buffer.from('papaya')] } }) - samples.push({ name: 'nested blob list non-match', lblob: { nested: [Buffer.from('pumpkin'), Buffer.from('turnip')] } }) - samples.push({ name: 'nested blob map match', mblob: { nested: { a: Buffer.from('guava'), b: Buffer.from('papaya') } } }) - samples.push({ name: 'nested blob map non-match', mblob: { nested: { a: Buffer.from('pumpkin'), b: Buffer.from('turnip') } } }) - samples.push({ name: 'nested blob mapkeys match', mkblob: { nested: new Map([[Buffer.from('guava'), 1], [Buffer.from('papaya'), 2]]) } }) - samples.push({ name: 'nested blob mapkeys non-match', mkblob: { nested: new Map([[Buffer.from('pumpkin'), 3], [Buffer.from('turnip'), 4]]) } }) - - indexes.push(['qidxBlob', 'blob', BLOB]) - indexes.push(['qidxBlobList', 'lblob', BLOB, LIST]) - indexes.push(['qidxBlobMap', 'mblob', BLOB, MAPVALUES]) - indexes.push(['qidxBlobMapKeys', 'mkblob', BLOB, MAPKEYS]) - indexes.push(['qidxBlobListNested', 'lblob', BLOB, LIST, new Context().addMapKey('nested')]) - indexes.push(['qidxBlobMapNested', 'mblob', BLOB, MAPVALUES, new Context().addMapKey('nested')]) - indexes.push(['qidxBlobMapKeysNested', 'mkblob', BLOB, MAPKEYS, new Context().addMapKey('nested')]) + describe('Additional test data', function () { + context('server version 7.0.0 and later', function () { + helper.skipUnlessVersion('>= 7.0.0', this) + it('Adds blob records and indexes', function () { + samples.push({ name: 'blob match', blob: Buffer.from('guava') }) + samples.push({ name: 'blob non-match', blob: Buffer.from('pumpkin') }) + samples.push({ name: 'blob list match', lblob: [Buffer.from('guava'), Buffer.from('papaya')] }) + samples.push({ name: 'blob list non-match', lblob: [Buffer.from('pumpkin'), Buffer.from('turnip')] }) + samples.push({ name: 'blob map match', mblob: { a: Buffer.from('guava'), b: Buffer.from('papaya') } }) + samples.push({ name: 'blob map non-match', mblob: { a: Buffer.from('pumpkin'), b: Buffer.from('turnip') } }) + samples.push({ name: 'blob mapkeys match', mkblob: new Map([[Buffer.from('guava'), 1], [Buffer.from('papaya'), 2]]) }) + samples.push({ name: 'blob mapkeys non-match', mkblob: new Map([[Buffer.from('pumpkin'), 3], [Buffer.from('turnip'), 4]]) }) + samples.push({ name: 'nested blob match', blob: { nested: Buffer.from('guava') } }) + samples.push({ name: 'nested blob non-match', blob: { nested: Buffer.from('pumpkin') } }) + samples.push({ name: 'nested blob list match', lblob: { nested: [Buffer.from('guava'), Buffer.from('papaya')] } }) + samples.push({ name: 'nested blob list non-match', lblob: { nested: [Buffer.from('pumpkin'), Buffer.from('turnip')] } }) + samples.push({ name: 'nested blob map match', mblob: { nested: { a: Buffer.from('guava'), b: Buffer.from('papaya') } } }) + samples.push({ name: 'nested blob map non-match', mblob: { nested: { a: Buffer.from('pumpkin'), b: Buffer.from('turnip') } } }) + samples.push({ name: 'nested blob mapkeys match', mkblob: { nested: new Map([[Buffer.from('guava'), 1], [Buffer.from('papaya'), 2]]) } }) + samples.push({ name: 'nested blob mapkeys non-match', mkblob: { nested: new Map([[Buffer.from('pumpkin'), 3], [Buffer.from('turnip'), 4]]) } }) + + indexes.push(['qidxBlob', 'blob', BLOB]) + indexes.push(['qidxBlobList', 'lblob', BLOB, LIST]) + indexes.push(['qidxBlobMap', 'mblob', BLOB, MAPVALUES]) + indexes.push(['qidxBlobMapKeys', 'mkblob', BLOB, MAPKEYS]) + indexes.push(['qidxBlobListNested', 'lblob', BLOB, LIST, new Context().addMapKey('nested')]) + indexes.push(['qidxBlobMapNested', 'mblob', BLOB, MAPVALUES, new Context().addMapKey('nested')]) + indexes.push(['qidxBlobMapKeysNested', 'mkblob', BLOB, MAPKEYS, new Context().addMapKey('nested')]) + }) }) })