Skip to content

Commit

Permalink
Don't install and start consul and etcd in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
GeorgianaElena authored and alexleach committed Jul 18, 2021
1 parent 422a072 commit 2058e04
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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: |
Expand Down
4 changes: 2 additions & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"])

Expand Down

0 comments on commit 2058e04

Please sign in to comment.