Skip to content

Commit

Permalink
remove aws signature tests
Browse files Browse the repository at this point in the history
  • Loading branch information
wconti27 committed Jan 3, 2025
1 parent 504b584 commit 7b07cce
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 170 deletions.
50 changes: 0 additions & 50 deletions packages/datadog-plugin-fetch/test/index.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -215,56 +215,6 @@ describe('Plugin', () => {
})
})

it('should skip injecting if the Authorization header contains an AWS signature', done => {
const app = express()

app.get('/', (req, res) => {
try {
expect(req.get('x-datadog-trace-id')).to.be.undefined
expect(req.get('x-datadog-parent-id')).to.be.undefined

res.status(200).send()

done()
} catch (e) {
done(e)
}
})

appListener = server(app, port => {
fetch(`http://localhost:${port}/`, {
headers: {
Authorization: 'AWS4-HMAC-SHA256 ...'
}
})
})
})

it('should skip injecting if one of the Authorization headers contains an AWS signature', done => {
const app = express()

app.get('/', (req, res) => {
try {
expect(req.get('x-datadog-trace-id')).to.be.undefined
expect(req.get('x-datadog-parent-id')).to.be.undefined

res.status(200).send()

done()
} catch (e) {
done(e)
}
})

appListener = server(app, port => {
fetch(`http://localhost:${port}/`, {
headers: {
Authorization: ['AWS4-HMAC-SHA256 ...']
}
})
})
})

it('should skip injecting if the X-Amz-Signature header is set', done => {
const app = express()

Expand Down
56 changes: 0 additions & 56 deletions packages/datadog-plugin-http/test/client.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -446,62 +446,6 @@ describe('Plugin', () => {
})
})

it('should skip injecting if the Authorization header contains an AWS signature', done => {
const app = express()

app.get('/', (req, res) => {
try {
expect(req.get('x-datadog-trace-id')).to.be.undefined
expect(req.get('x-datadog-parent-id')).to.be.undefined

res.status(200).send()

done()
} catch (e) {
done(e)
}
})

appListener = server(app, port => {
const req = http.request({
port,
headers: {
Authorization: 'AWS4-HMAC-SHA256 ...'
}
})

req.end()
})
})

it('should skip injecting if one of the Authorization headers contains an AWS signature', done => {
const app = express()

app.get('/', (req, res) => {
try {
expect(req.get('x-datadog-trace-id')).to.be.undefined
expect(req.get('x-datadog-parent-id')).to.be.undefined

res.status(200).send()

done()
} catch (e) {
done(e)
}
})

appListener = server(app, port => {
const req = http.request({
port,
headers: {
Authorization: ['AWS4-HMAC-SHA256 ...']
}
})

req.end()
})
})

it('should skip injecting if the X-Amz-Signature header is set', done => {
const app = express()

Expand Down
64 changes: 0 additions & 64 deletions packages/datadog-plugin-http2/test/client.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -365,70 +365,6 @@ describe('Plugin', () => {
})
})

it('should skip injecting if the Authorization header contains an AWS signature', done => {
const app = (stream, headers) => {
try {
expect(headers['x-datadog-trace-id']).to.be.undefined
expect(headers['x-datadog-parent-id']).to.be.undefined

stream.respond({
':status': 200
})
stream.end()

done()
} catch (e) {
done(e)
}
}

appListener = server(app, port => {
const headers = {
Authorization: 'AWS4-HMAC-SHA256 ...'
}
const client = http2
.connect(`${protocol}://localhost:${port}`)
.on('error', done)

const req = client.request(headers)
req.on('error', done)

req.end()
})
})

it('should skip injecting if one of the Authorization headers contains an AWS signature', done => {
const app = (stream, headers) => {
try {
expect(headers['x-datadog-trace-id']).to.be.undefined
expect(headers['x-datadog-parent-id']).to.be.undefined

stream.respond({
':status': 200
})
stream.end()

done()
} catch (e) {
done(e)
}
}

appListener = server(app, port => {
const headers = {
Authorization: ['AWS4-HMAC-SHA256 ...']
}
const client = http2
.connect(`${protocol}://localhost:${port}`)
.on('error', done)

const req = client.request(headers)
req.on('error', done)

req.end()
})
})

it('should skip injecting if the X-Amz-Signature header is set', done => {
const app = (stream, headers) => {
try {
Expand Down

0 comments on commit 7b07cce

Please sign in to comment.