Browse Source

Don't set environment variables in tox.ini

Because of the bug [1] in tox 2.2.1 tox there's a need
to hard-code all environment variables except
the ones which are not set by Fuel CI.

This patch will be reverted as soon as [1] is fixed.

1. https://bitbucket.org/hpk42/tox/issues/285/tox-220-breaks-some-toxini-config-files

Closes-bug: #1517427
Change-Id: I32903c1fd5545ca56410789add7d9c2a8bbacba7
tags/8.0
Roman Prykhodchenko 4 years ago
parent
commit
3e7738fd3f
3 changed files with 22 additions and 15 deletions
  1. +1
    -1
      tools/cleanup.sh
  2. +1
    -0
      tools/prepare_nailgun.sh
  3. +20
    -14
      tox.ini

+ 1
- 1
tools/cleanup.sh View File

@@ -17,7 +17,7 @@
set -eu

NAILGUN_CONFIG=$ARTIFACTS/test.yaml
NAILGUN_ROOT=$FUEL_WEB_ROOT/nailgun

# Sends SIGING to the running instance of Nailgun, if it exists
kill_server() {

+ 1
- 0
tools/prepare_nailgun.sh View File

@@ -17,6 +17,7 @@
set -eu

NAILGUN_CONFIG=$ARTIFACTS/test.yaml
NAILGUN_ROOT=$FUEL_WEB_ROOT/nailgun

err() {
printf "%s\n" "$1" >&2

+ 20
- 14
tox.ini View File

@@ -9,24 +9,30 @@ install_command = pip install --allow-external -U {opts} {packages}
whitelist_externals = bash
oslo_debug_helper
setenv = VIRTUAL_ENV={envdir}
ARTIFACTS={toxinidir}/{env:ARTIFACTS:test_run}
FUELCLIENT_JUNIT={env:FUELCLIENT_JUNIT:fuelclient}-{envname}.xml
FUELCLIENT_CUSTOM_SETTINGS={toxinidir}/{env:ARTIFACTS:test_run}/fuel_client_config.yaml
ARTIFACTS={toxinidir}/test_run
FUELCLIENT_JUNIT=fuelclient-{envname}.xml
FUELCLIENT_CUSTOM_SETTINGS={toxinidir}/test_run/fuel_client_config.yaml

# Functional env settings
FUEL_WEB_CLONE={env:FUEL_WEB_CLONE:yes}
FUEL_WEB_REPO={env:FUEL_WEB_REPO:https://github.com/stackforge/fuel-web.git}
FUEL_WEB_ROOT={env:FUEL_WEB_ROOT:/tmp/fuel_web}
FETCH_REPO={env:FETCH_REPO:}
FETCH_REFSPEC={env:FETCH_REFSPEC:}
FUEL_COMMIT={env:FUEL_COMMIT:master}
NAILGUN_ROOT={env:FUEL_WEB_ROOT:/tmp/fuel_web}/nailgun
FUEL_WEB_CLONE=yes
FUEL_WEB_REPO=https://github.com/stackforge/fuel-web.git
FETCH_REPO=
FETCH_REFSPEC=
FUEL_COMMIT=master
NAILGUN_ROOT=/tmp/fuel_web/nailgun

# Nailgun server parameters
NAILGUN_PORT={env:NAILGUN_PORT:8003}
NAILGUN_CHECK_PATH={env:NAILGUN_CHECK_PATH:/api/version}
NAILGUN_START_MAX_WAIT_TIME={env:NAILGUN_START_MAX_WAIT_TIME:20}
TEST_NAILGUN_DB={env:TEST_NAILGUN_DB:nailgun}
NAILGUN_PORT=8003
NAILGUN_CHECK_PATH=/api/version
NAILGUN_START_MAX_WAIT_TIME=20

# NOTE(romcheg): this is a temporary change to work around
# a bug in tox 2.2.1
# Don't forget to set up all these variables,
# manually if you're trying to run tests on
# your local environment.
passenv = FUEL_WEB_ROOT TEST_NAILGUN_DB

deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands =

Loading…
Cancel
Save