forked from ansible/molecule
-
Notifications
You must be signed in to change notification settings - Fork 0
/
conftest.py
22 lines (15 loc) · 668 Bytes
/
conftest.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
"""PyTest Config File."""
from __future__ import print_function
import os
import pytest
pytest_plugins = ["helpers_namespace"]
@pytest.fixture(scope="session", autouse=True)
def environ():
"""Configure default environment for tests."""
# disable use of .netrc file to avoid galaxy-install errors with:
# [ERROR]: failed to download the file: HTTP Error 401: Unauthorized
# https://github.com/ansible/ansible/issues/61666
os.environ["NETRC"] = ""
# adds extra environment variables that may be needed during testing
if not os.environ.get("TEST_BASE_IMAGE", ""):
os.environ["TEST_BASE_IMAGE"] = "docker.io/pycontribs/centos:8"