Skip to content

Commit

Permalink
Configure winston logging when running terraform tests.
Browse files Browse the repository at this point in the history
Otherwise warnings are printed about unconfigured transports.
  • Loading branch information
tasdomas committed Oct 26, 2022
1 parent ee8d4c5 commit 7fd0b9d
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/terraform.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
const winston = require('winston');
const { iterativeCmlRunnerTpl } = require('./terraform');

describe('Terraform tests', () => {
beforeAll(() => {
winston.configure({
transports: [
new winston.transports.Console({
level: 'error',
handleExceptions: true
})
]
});
});

test('default options', async () => {
const output = iterativeCmlRunnerTpl({});
expect(JSON.stringify(output, null, 2)).toMatchInlineSnapshot(`
Expand Down

2 comments on commit 7fd0b9d

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test Comment

CML watermark

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test Comment

CML watermark

Please sign in to comment.