From 2058e04d193ca3750600a87c659710e7c0289972 Mon Sep 17 00:00:00 2001 From: GeorgianaElena Date: Wed, 7 Jul 2021 13:35:18 +0300 Subject: [PATCH] Don't install and start consul and etcd in tests --- .github/workflows/test.yml | 3 +-- tests/conftest.py | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index de361516..9d66e319 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -35,7 +35,6 @@ jobs: # steps as if would used `export MY_ENV=my-value`. - name: Configure environment variables run: | - echo "ETCDCTL_API=3" >> $GITHUB_ENV echo "PATH=$PWD/bin:$PATH" >> $GITHUB_ENV - uses: actions/checkout@v2 # NOTE: actions/setup-python@v2 make use of a cache within the GitHub base @@ -57,7 +56,7 @@ jobs: run: | pip install --upgrade setuptools pip pip install -r dev-requirements.txt --upgrade . - python -m jupyterhub_traefik_proxy.install --traefik --etcd --consul --output=./bin + python -m jupyterhub_traefik_proxy.install --traefik --output=./bin pip freeze - name: Run tests run: | diff --git a/tests/conftest.py b/tests/conftest.py index 34e7ebfd..61b65eb3 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -123,7 +123,7 @@ def launch_traefik_file(): proc.wait() -@pytest.fixture(scope="session", autouse=True) +@pytest.fixture(scope="session", autouse=False) def etcd(): etcd_proc = subprocess.Popen("etcd", stdout=None, stderr=None) yield etcd_proc @@ -133,7 +133,7 @@ def etcd(): shutil.rmtree(os.getcwd() + "/default.etcd/") -@pytest.fixture(scope="function", autouse=True) +@pytest.fixture(scope="function", autouse=False) def clean_etcd(): subprocess.run(["etcdctl", "del", '""', "--from-key=true"])