From 9bed83ac76682fb64dd8af4c169d298f147d1aa7 Mon Sep 17 00:00:00 2001 From: Kevin Klues Date: Wed, 28 Jun 2017 21:26:49 -0700 Subject: [PATCH] Updated consolidated tox.ini files and made them workable on windows. Some extra environment variables are necessary on windows to get the CLI to pass the integration tests when using 'tox'. Specifically, the HOME* environment variables are needed to allow python's 'expanduser()' function to succeed when resolving the '~' path for the default DCOS_DIR. Additionally, the OPENSSL_CONF variable is need to allow SSL connections to be made properly using the windows OpenSSL library. Without these additional variables things seem to die in unexpected ways. --- cli/tox.ini | 9 +++++++++ tox.ini | 9 +++++++++ tox.win.ini | 29 ----------------------------- 3 files changed, 18 insertions(+), 29 deletions(-) delete mode 100644 tox.win.ini diff --git a/cli/tox.ini b/cli/tox.ini index 008ee0a..b6993d4 100644 --- a/cli/tox.ini +++ b/cli/tox.ini @@ -15,7 +15,16 @@ deps = teamcity-messages -e.. +# We currently include '*' as a catch all even though we also whitelist +# specific # environment variables we know we care about. We should audit this in +# the near future. passenv = + * + HOME + USERPROFILE + HOMEPATH + HOMEDRIVE + OPENSSL_CONF DCOS_* CI_FLAGS CLI_TEST_SSH_KEY_PATH diff --git a/tox.ini b/tox.ini index 8c69e8c..37d61b1 100644 --- a/tox.ini +++ b/tox.ini @@ -13,7 +13,16 @@ deps = pytest-cov teamcity-messages +# We currently include '*' as a catch all even though we also whitelist +# specific # environment variables we know we care about. We should audit this in +# the near future. passenv = + * + HOME + USERPROFILE + HOMEPATH + HOMEDRIVE + OPENSSL_CONF DCOS_* CI_FLAGS CLI_TEST_SSH_KEY_PATH diff --git a/tox.win.ini b/tox.win.ini deleted file mode 100644 index 38ebed9..0000000 --- a/tox.win.ini +++ /dev/null @@ -1,29 +0,0 @@ -[tox] -envlist = py35-unit -toxworkdir={env:TOXWORKDIR:.tox} - -[testenv] -setenv = - DCOS_CONFIG = {env:DCOS_CONFIG} - -passenv = - TEAMCITY_VERSION - -deps = - pytest - pytest-cov - pypiwin32 - teamcity-messages - -[testenv:syntax] -deps = - flake8 - flake8-import-order==0.9.2 - pep8-naming - -commands = - flake8 --verbose {env:CI_FLAGS:} dcos tests setup.py - -[testenv:py35-unit] -commands = - py.test -vv {env:CI_FLAGS:} --cov {envsitepackagesdir}/dcos tests