Skip to content

Commit

Permalink
feat: implement contract tests for Fleet
Browse files Browse the repository at this point in the history
  • Loading branch information
mdelapenya committed Oct 13, 2020
1 parent f442c27 commit 2fbb1b3
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
23 changes: 23 additions & 0 deletions x-pack/plugins/ingest_manager/fleet.pact.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/

const { Verifier } = require('@pact-foundation/pact');

describe('Pact Verification', () => {
it('validates the expectations of E2E Tests', () => {
const opts = {
logLevel: 'INFO',
providerBaseUrl: 'http://localhost:5601',
provider: 'Kibana Fleet',
providerVersion: '8.0.0-SNAPSHOT',
pactUrls: [
'https://raw.githubusercontent.com/elastic/e2e-testing/0aa330ea7c785ec43889d9fdde030c00711567ad/pacts/e2e_testing_framework-fleet.json',
],
};

return new Verifier(opts).verifyProvider().finally(() => {});
});
});
3 changes: 3 additions & 0 deletions x-pack/plugins/ingest_manager/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,8 @@
"dependencies": {
"abort-controller": "^3.0.0",
"ajv": "^6.12.4"
},
"scripts": {
"test:pact": "npx jest --testMatch \"**/*.pact.test.js\""
}
}

0 comments on commit 2fbb1b3

Please sign in to comment.