Skip to content

Commit

Permalink
v0.0.45
Browse files Browse the repository at this point in the history
  • Loading branch information
boristane committed Oct 13, 2023
1 parent 1da48e7 commit d0d0070
Showing 1 changed file with 23 additions and 7 deletions.
30 changes: 23 additions & 7 deletions test/stackid.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ describe('stack id', () => {
test('stackId is added by default', () => {
const app = new cdk.App();
const stack = new cdk.Stack(app, 'TestStack');

baselime.Baselime.init(stack, {
apiKey: 'xxxx',
});
Expand All @@ -25,8 +25,16 @@ describe('stack id', () => {
template.hasResourceProperties("Custom::BaselimeQuery", {
Parameters: {
filters: [
"timestamp > 1234",
"$baselime.stackId = TestStack"
{
"key": "timestamp",
"operation": ">",
"value": 1234
},
{
"key": "$baselime.stackId",
"operation": "=",
"value": "TestStack"
}
]
}
})
Expand All @@ -36,7 +44,7 @@ describe('stack id', () => {
test('stackId is not added if parameter is set on init', () => {
const app = new cdk.App();
const stack = new cdk.Stack(app, 'TestStack');

baselime.Baselime.init(stack, {
apiKey: 'xxxx',
disableStackFilter: true,
Expand All @@ -53,7 +61,11 @@ describe('stack id', () => {
template.hasResourceProperties("Custom::BaselimeQuery", {
Parameters: {
filters: [
"timestamp > 1234",
{
"key": "timestamp",
"operation": ">",
"value": 1234
}
]
}
})
Expand All @@ -62,7 +74,7 @@ describe('stack id', () => {
test('stackId is not added if parameter is set on query', () => {
const app = new cdk.App();
const stack = new cdk.Stack(app, 'TestStack');

baselime.Baselime.init(stack, {
apiKey: 'xxxx',
});
Expand All @@ -79,7 +91,11 @@ describe('stack id', () => {
template.hasResourceProperties("Custom::BaselimeQuery", {
Parameters: {
filters: [
"timestamp > 1234",
{
"key": "timestamp",
"operation": ">",
"value": 1234
}
]
}
})
Expand Down

0 comments on commit d0d0070

Please sign in to comment.