From d618868a88bfc98c0aad1d7bf8cf413b1abc0caa Mon Sep 17 00:00:00 2001 From: Matteo Collina Date: Wed, 16 Oct 2019 14:45:35 +0200 Subject: [PATCH] maybe? --- .github/workflows/ci.yml | 3 ++- docker-compose-v7-es-only.yml | 9 +++++++++ test/acceptance.test.js | 4 +++- 3 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 docker-compose-v7-es-only.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 71ebc05..19b00d1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,7 +20,8 @@ jobs: - name: npm install, and test run: | npm install - docker-compose -f docker-compose-v7.yml up -d + docker-compose -f docker-compose-v7-es-only.yml up -d + sleep 10 npm test env: CI: true diff --git a/docker-compose-v7-es-only.yml b/docker-compose-v7-es-only.yml new file mode 100644 index 0000000..0097b08 --- /dev/null +++ b/docker-compose-v7-es-only.yml @@ -0,0 +1,9 @@ +--- +version: '3.6' +services: + elasticsearch: + image: docker.elastic.co/elasticsearch/elasticsearch:7.4.0 + environment: + - discovery.type=single-node + container_name: elasticsearch + ports: ['9200:9200'] diff --git a/test/acceptance.test.js b/test/acceptance.test.js index 296bf9b..d496b2b 100644 --- a/test/acceptance.test.js +++ b/test/acceptance.test.js @@ -25,7 +25,9 @@ var es tap.beforeEach(async () => { if (es) { es = IER() - await es.waitCluster() + if (!await es.isRunning()) { + await es.waitCluster() + } } const result = await client.info() esVersion = Number(result.body.version.number.split('.')[0])