Skip to content

Commit

Permalink
Adds a test for the proxy bypass config
Browse files Browse the repository at this point in the history
  • Loading branch information
Joel Griffith committed Aug 10, 2020
1 parent 09818b4 commit 4720872
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions x-pack/plugins/reporting/server/config/schema.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,34 @@ describe('Reporting Config Schema', () => {
).toMatchObject({ hostname: 'Frodo' });
});

it('allows setting a wildcard for chrome proxy bypass', () => {
expect(
ConfigSchema.validate({
capture: {
browser: {
chromium: {
proxy: {
enabled: true,
server: 'http://example.com:8080',
bypass: ['foo.example.com', 'bar.example.com', 'bats.example.com'],
},
},
},
},
}).capture.browser.chromium.proxy
).toMatchInlineSnapshot(`
Object {
"bypass": Array [
"foo.example.com",
"bar.example.com",
"bats.example.com",
],
"enabled": true,
"server": "http://example.com:8080",
}
`);
});

it(`logs the proper validation messages`, () => {
// kibanaServer
const throwValidationErr = () => ConfigSchema.validate({ kibanaServer: { hostname: '0' } });
Expand Down

0 comments on commit 4720872

Please sign in to comment.