|
|
|
@ -452,7 +452,7 @@ describe('InfluxDataSource Frontend Mode', () => { |
|
|
|
|
.withIncludeAll(true) |
|
|
|
|
.build(); |
|
|
|
|
const result = ds.interpolateQueryExpr(value, variableMock, 'select from /^($tempVar)$/'); |
|
|
|
|
const expectation = `env|env2|env3`; |
|
|
|
|
const expectation = `(env|env2|env3)`; |
|
|
|
|
expect(result).toBe(expectation); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
@ -476,7 +476,7 @@ describe('InfluxDataSource Frontend Mode', () => { |
|
|
|
|
const value = [`/special/path`, `/some/other/path`]; |
|
|
|
|
const variableMock = queryBuilder().withId('tempVar').withName('tempVar').withMulti().build(); |
|
|
|
|
const result = ds.interpolateQueryExpr(value, variableMock, `select that where path = '$tempVar'`); |
|
|
|
|
const expectation = `\\/special\\/path|\\/some\\/other\\/path`; |
|
|
|
|
const expectation = `(\\/special\\/path|\\/some\\/other\\/path)`; |
|
|
|
|
expect(result).toBe(expectation); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
@ -505,7 +505,7 @@ describe('InfluxDataSource Frontend Mode', () => { |
|
|
|
|
.build(); |
|
|
|
|
const value = [`/special/path`, `/some/other/path`]; |
|
|
|
|
const result = ds.interpolateQueryExpr(value, variableMock, `select that where path = /$tempVar/`); |
|
|
|
|
const expectation = `\\/special\\/path|\\/some\\/other\\/path`; |
|
|
|
|
const expectation = `(\\/special\\/path|\\/some\\/other\\/path)`; |
|
|
|
|
expect(result).toBe(expectation); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|