Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
uurien committed Sep 23, 2024
1 parent c691443 commit d09f6f9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ describe('sequelize', () => {
// close agent
after(() => {
appsec.disable()
return agent.close()
return agent.close({ ritmReset: false })
})

// init database
Expand Down
12 changes: 6 additions & 6 deletions packages/dd-trace/test/appsec/rasp/sql_injection.spec.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict'

const { pgQueryStart, mysql2ConnectionQueryStart } = require('../../../src/appsec/channels')
const { pgQueryStart, mysql2OuterQueryStart } = require('../../../src/appsec/channels')
const addresses = require('../../../src/appsec/addresses')
const proxyquire = require('proxyquire')

Expand Down Expand Up @@ -122,7 +122,7 @@ describe('RASP - sql_injection', () => {
const req = {}
datadogCore.storage.getStore.returns({ req })

mysql2ConnectionQueryStart.publish(ctx)
mysql2OuterQueryStart.publish(ctx)

const persistent = {
[addresses.DB_STATEMENT]: 'SELECT 1',
Expand All @@ -140,7 +140,7 @@ describe('RASP - sql_injection', () => {
const req = {}
datadogCore.storage.getStore.returns({ req })

mysql2ConnectionQueryStart.publish(ctx)
mysql2OuterQueryStart.publish(ctx)

sinon.assert.notCalled(waf.run)
})
Expand All @@ -151,7 +151,7 @@ describe('RASP - sql_injection', () => {
}
datadogCore.storage.getStore.returns(undefined)

mysql2ConnectionQueryStart.publish(ctx)
mysql2OuterQueryStart.publish(ctx)

sinon.assert.notCalled(waf.run)
})
Expand All @@ -162,7 +162,7 @@ describe('RASP - sql_injection', () => {
}
datadogCore.storage.getStore.returns({})

mysql2ConnectionQueryStart.publish(ctx)
mysql2OuterQueryStart.publish(ctx)

sinon.assert.notCalled(waf.run)
})
Expand All @@ -173,7 +173,7 @@ describe('RASP - sql_injection', () => {
}
datadogCore.storage.getStore.returns({})

mysql2ConnectionQueryStart.publish(ctx)
mysql2OuterQueryStart.publish(ctx)

sinon.assert.notCalled(waf.run)
})
Expand Down

0 comments on commit d09f6f9

Please sign in to comment.