export OPNFV_ARTIFACT_VERSION="dev${GERRIT_CHANGE_NUMBER}_${GERRIT_PATCHSET_NUMBER}"
echo "Uploading development build tarball"
pushd $BUILD_DIRECTORY > /dev/null
- tar czf apex-${OPNFV_ARTIFACT_VERSION}.tar.gz *.qcow2
+ tar czf apex-${OPNFV_ARTIFACT_VERSION}.tar.gz *.qcow2 *.vmlinuz *.initrd
gsutil cp apex-${OPNFV_ARTIFACT_VERSION}.tar.gz gs://$GS_URL/apex-${OPNFV_ARTIFACT_VERSION}.tar.gz > gsutil.latest.log
popd > /dev/null
}
project:
- 'openstack':
project-repo: 'https://git.openstack.org/openstack/bifrost'
- clone-location: '/opt/bifrost'
+ clone-location: '$WORKSPACE/bifrost'
- 'opnfv':
project-repo: 'https://gerrit.opnfv.org/gerrit/releng'
- clone-location: '/opt/releng'
+ clone-location: '$WORKSPACE/releng'
#--------------------------------
# distros
#--------------------------------
fi
# remove previously cloned repos
-sudo /bin/rm -rf /opt/bifrost /opt/releng
+/bin/rm -rf $WORKSPACE/bifrost $WORKSPACE/releng
# Fix up permissions
fix_ownership
# clone all the repos first and checkout the patch afterwards
-sudo git clone https://git.openstack.org/openstack/bifrost /opt/bifrost
-sudo git clone https://gerrit.opnfv.org/gerrit/releng /opt/releng
+git clone https://git.openstack.org/openstack/bifrost $WORKSPACE/bifrost
+git clone https://gerrit.opnfv.org/gerrit/releng $WORKSPACE/releng
# checkout the patch
cd $CLONE_LOCATION
-sudo git fetch $PROJECT_REPO $GERRIT_REFSPEC && sudo git checkout FETCH_HEAD
+git fetch $PROJECT_REPO $GERRIT_REFSPEC && sudo git checkout FETCH_HEAD
# combine opnfv and upstream scripts/playbooks
-sudo /bin/cp -rf /opt/releng/prototypes/bifrost/* /opt/bifrost/
+/bin/cp -rf $WORKSPACE/releng/prototypes/bifrost/* $WORKSPACE/bifrost/
# cleanup remnants of previous deployment
-cd /opt/bifrost
+cd $WORKSPACE/bifrost
sudo -H -E ./scripts/destroy-env.sh
# provision 3 VMs; xcimaster, controller, and compute
-cd /opt/bifrost
+cd $WORKSPACE/bifrost
./scripts/bifrost-provision.sh
# list the provisioned VMs
-cd /opt/bifrost
+cd $WORKSPACE/bifrost
source env-vars
ironic node-list
sudo -H -E virsh list
# proceed with the deployment
cd $WORKSPACE/prototypes/xci
-sudo -E ./xci-deploy.sh
+./xci-deploy.sh
if [[ "$JOB_NAME" =~ "periodic" && "$OPENSTACK_OSA_VERSION" == "master" ]]; then
# if we arrived here without failing, it means we have something we can pin
+++ /dev/null
----
-# The ironic API URL for bifrost operations. Defaults to localhost.
-# ironic_url: "http://localhost:6385/"
-
-# The network interface that bifrost will be operating on. Defaults
-# to virbr0 in roles, can be overridden here.
-# network_interface: "virbr0"
-
-# The path to the SSH key to be utilized for testing and burn-in
-# to configuration drives. When set, it should be set in both baremetal
-# and localhost groups, however this is only an override to the default.
-
-# workaround for opnfv ci until we can fix non-root use
-ssh_public_key_path: "/root/.ssh/id_rsa.pub"
-
-# Normally this user should be root, however if cirros is used,
-# a user may wish to define a specific user for testing VM
-# connectivity during a test sequence
-testing_user: root
-
-# The default port to download files via. Required for IPA URL generation.
-# Presently the defaults are located in the roles, however if changed both
-# the localhost and baremetal group files must be updated.
-# file_url_port: 8080
-
-# IPA Image parameters. If these are changed, they must be changed in
-# Both localhost and baremetal groups. Presently the defaults
-# in each role should be sufficent for proper operation.
-# ipa_kernel: "{{http_boot_folder}}/coreos_production_pxe.vmlinuz"
-# ipa_ramdisk: "{{http_boot_folder}}/coreos_production_pxe_image-oem.cpio.gz"
-# ipa_kernel_url: "http://{{ hostvars[inventory_hostname]['ansible_' + network_interface]['ipv4']['address'] }}:{{file_url_port}}/coreos_production_pxe.vmlinuz"
-# ipa_ramdisk_url: "http://{{ hostvars[inventory_hostname]['ansible_' + network_interface]['ipv4']['address'] }}:{{file_url_port}}/coreos_production_pxe_image-oem.cpio.gz"
-
-# The http_boot_folder defines the root folder for the webserver.
-# If this setting is changed, it must be applied to both the baremetal
-# and localhost groups. Presently the role defaults are set to the value
-# below.
-# http_boot_folder: /httpboot
-
-# The settings for the name of the image to be deployed along with the
-# on disk location are below. If changed, these settings must be applied
-# to both the baremetal and localhost groups. If the file is already on
-# disk, then the image generation will not take place, otherwise an image
-# will be generated using diskimage-builder.
-# deploy_image_filename: "deployment_image.qcow2"
-# deploy_image: "{{http_boot_folder}}/{{deploy_image_filename}}"
-
-# Under normal circumstances, the os_ironic_node module does not wait for
-# the node to reach active state before continuing with the deployment
-# process. This means we may have to timeout, to figure out a deployment
-# failed. Change wait_for_node_deploy to true to cause bifrost to wait for
-# Ironic to show the instance in Active state.
-wait_for_node_deploy: false
execute sandbox script
- sudo -E ./xci-deploy.sh
-
-Warning::
-
- Please encure you always execute the sandbox script using **sudo -E**
- in order to make the environment variables you set available to the
- sandbox script or you end up with the default settings.
+ ./xci-deploy.sh
===============
User Variables
# OPNFV XCI Sandbox is not verified to be used as non-root user as of yet so
# changing these paths might break things.
#-------------------------------------------------------------------------------
-export OPNFV_RELENG_PATH=/opt/releng
-export OPENSTACK_BIFROST_PATH=/opt/bifrost
-export OPENSTACK_OSA_PATH=/opt/openstack-ansible
+export XCI_DEVEL_ROOT=${XCI_DEVEL_ROOT:-"/tmp/.xci-deploy-env"}
+export OPNFV_RELENG_PATH="${XCI_DEVEL_ROOT}/releng"
+export OPENSTACK_BIFROST_PATH="${XCI_DEVEL_ROOT}/bifrost"
+export OPENSTACK_OSA_PATH="${XCI_DEVEL_ROOT}/openstack-ansible"
+export OPNFV_SSH_HOST_KEYS_PATH="${XCI_DEVEL_ROOT}/ssh_host_keys"
#-------------------------------------------------------------------------------
# Set the playbook to use for OpenStack deployment
# or
# ANSIBLE_VERBOSITY="-vvvv"
export ANSIBLE_VERBOSITY=${ANSIBLE_VERBOSITY-""}
-export LOG_PATH=${LOG_PATH:-/opt/opnfv/logs}
+export LOG_PATH=${LOG_PATH:-${XCI_DEVEL_ROOT}/opnfv/logs}
export RUN_TEMPEST=${RUN_TEMPEST:-false}
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
- hosts: localhost
- remote_user: root
+ connection: local
vars_files:
- ../var/{{ ansible_os_family }}.yml
- ../var/opnfv.yml
roles:
- role: remove-folders
- { role: clone-repository, project: "opnfv/releng", repo: "{{ OPNFV_RELENG_GIT_URL }}", dest: "{{ OPNFV_RELENG_PATH }}", version: "{{ OPNFV_RELENG_VERSION }}" }
+
+- hosts: localhost
+ connection: local
+ gather_facts: false
+ vars_files:
+ - ../var/{{ ansible_os_family }}.yml
+ - ../var/opnfv.yml
+ tasks:
+ - name: Synchronize local development releng repository to XCI paths
+ synchronize:
+ src: "{{ OPNFV_RELENG_DEV_PATH }}"
+ dest: "{{ OPNFV_RELENG_PATH }}"
+ recursive: yes
+ delete: yes
+ when:
+ - OPNFV_RELENG_DEV_PATH != ""
+
+- hosts: localhost
+ connection: local
+ vars_files:
+ - ../var/{{ ansible_os_family }}.yml
+ - ../var/opnfv.yml
tasks:
- name: create log directory {{LOG_PATH}}
file:
- role: remove-folders
- { role: clone-repository, project: "opnfv/releng", repo: "{{ OPNFV_RELENG_GIT_URL }}", dest: "{{ OPNFV_RELENG_PATH }}", version: "{{ OPNFV_RELENG_VERSION }}" }
- { role: clone-repository, project: "openstack/openstack-ansible", repo: "{{ OPENSTACK_OSA_GIT_URL }}", dest: "{{ OPENSTACK_OSA_PATH }}", version: "{{ OPENSTACK_OSA_VERSION }}" }
+
+- hosts: opnfv
+ remote_user: root
+ vars_files:
+ - ../var/{{ ansible_os_family }}.yml
+ - ../var/opnfv.yml
+ tasks:
+ - name: Synchronize local development releng repository to XCI paths
+ synchronize:
+ src: "{{ OPNFV_RELENG_DEV_PATH }}"
+ dest: "{{ OPNFV_RELENG_PATH }}"
+ recursive: yes
+ delete: yes
+ when:
+ - OPNFV_RELENG_DEV_PATH != ""
+ - name: Synchronize local development openstack-ansible repository to XCI paths
+ synchronize:
+ src: "{{ OPENSTACK_OSA_DEV_PATH }}"
+ dest: "{{ OPENSTACK_OSA_PATH }}"
+ recursive: yes
+ delete: yes
+ when:
+ - OPENSTACK_OSA_DEV_PATH != ""
+
+- hosts: opnfv
+ remote_user: root
+ vars_files:
+ - ../var/{{ ansible_os_family }}.yml
+ - ../var/flavor-vars.yml
+ - ../var/opnfv.yml
+ roles:
# TODO: this only works for ubuntu/xenial and need to be adjusted for other distros
- { role: configure-network, when: ansible_distribution_release == "xenial", src: "../template/opnfv.interface.j2", dest: "/etc/network/interfaces" }
tasks:
shell: ssh-keygen -b 2048 -t rsa -f /root/.ssh/id_rsa -q -N ""
args:
creates: /root/.ssh/id_rsa
+ - name: ensure ssh key storage directory exists
+ file:
+ path: "{{ OPNFV_SSH_HOST_KEYS_PATH }}"
+ state: directory
- name: fetch public key
- fetch: src="/root/.ssh/id_rsa.pub" dest="/"
+ fetch: src="/root/.ssh/id_rsa.pub" dest="{{ OPNFV_SSH_HOST_KEYS_PATH }}"
- name: copy flavor inventory
shell: "/bin/cp -rf {{XCI_FLAVOR_ANSIBLE_FILE_PATH}}/inventory {{OPNFV_RELENG_PATH}}/prototypes/xci/playbooks"
- name: copy flavor vars
chdir: "{{OPENSTACK_OSA_PATH}}/scripts"
- hosts: localhost
remote_user: root
+ vars_files:
+ - ../var/opnfv.yml
tasks:
- name: Generate authorized_keys
- shell: "/bin/cat /opnfv/root/.ssh/id_rsa.pub >> ../file/authorized_keys"
+ shell: "/bin/cat {{ OPNFV_SSH_HOST_KEYS_PATH }}/opnfv/root/.ssh/id_rsa.pub >> ../file/authorized_keys"
- name: Append public keys to authorized_keys
- shell: "/bin/cat /root/.ssh/id_rsa.pub >> ../file/authorized_keys"
+ shell: "/bin/cat {{ ansible_env.HOME }}/.ssh/id_rsa.pub >> ../file/authorized_keys"
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
- hosts: localhost
- remote_user: root
+ connection: local
vars_files:
- ../var/{{ ansible_os_family }}.yml
- ../var/opnfv.yml
- role: remove-folders
- { role: clone-repository, project: "opnfv/releng", repo: "{{ OPNFV_RELENG_GIT_URL }}", dest: "{{ OPNFV_RELENG_PATH }}", version: "{{ OPNFV_RELENG_VERSION }}" }
- { role: clone-repository, project: "opnfv/bifrost", repo: "{{ OPENSTACK_BIFROST_GIT_URL }}", dest: "{{ OPENSTACK_BIFROST_PATH }}", version: "{{ OPENSTACK_BIFROST_VERSION }}" }
+
+- hosts: localhost
+ connection: local
+ gather_facts: false
+ vars_files:
+ - ../var/{{ ansible_os_family }}.yml
+ - ../var/opnfv.yml
+ tasks:
+ - name: Synchronize local development bifrost repository to XCI paths
+ # command module is much faster than the copy module
+ synchronize:
+ src: "{{ OPENSTACK_BIFROST_DEV_PATH }}"
+ dest: "{{ OPENSTACK_BIFROST_PATH }}"
+ recursive: yes
+ delete: yes
+ when:
+ - OPENSTACK_BIFROST_DEV_PATH != ""
+ - name: Synchronize local development releng repository to XCI paths
+ synchronize:
+ src: "{{ OPNFV_RELENG_DEV_PATH }}"
+ dest: "{{ OPNFV_RELENG_PATH }}"
+ recursive: yes
+ delete: yes
+ when:
+ - OPNFV_RELENG_DEV_PATH != ""
+
+- hosts: localhost
+ connection: local
+ gather_facts: false
+ vars_files:
+ - ../var/{{ ansible_os_family }}.yml
+ - ../var/opnfv.yml
tasks:
- name: combine opnfv/releng and openstack/bifrost scripts/playbooks
copy:
src: "{{ OPNFV_RELENG_PATH }}/prototypes/bifrost/"
dest: "{{ OPENSTACK_BIFROST_PATH }}"
+
+- hosts: localhost
+ connection: local
+ become: yes
+ vars_files:
+ - ../var/{{ ansible_os_family }}.yml
+ - ../var/opnfv.yml
+ tasks:
- name: destroy VM nodes created by previous deployment
command: "/bin/bash ./scripts/destroy-env.sh"
args:
chdir: "{{ OPENSTACK_BIFROST_PATH }}"
+
+- hosts: localhost
+ connection: local
+ vars_files:
+ - ../var/{{ ansible_os_family }}.yml
+ - ../var/opnfv.yml
+ tasks:
- name: create and provision VM nodes for the flavor {{ XCI_FLAVOR }}
command: "/bin/bash ./scripts/bifrost-provision.sh"
args:
- "{{ OPENSTACK_OSA_PATH }}"
- "{{ OPENSTACK_OSA_ETC_PATH }}"
- "{{ LOG_PATH }} "
+ - "{{ OPNFV_SSH_HOST_KEYS_PATH }}"
##############################################################################
OPNFV_RELENG_GIT_URL: "{{ lookup('env','OPNFV_RELENG_GIT_URL') }}"
OPNFV_RELENG_PATH: "{{ lookup('env','OPNFV_RELENG_PATH') }}"
+OPNFV_RELENG_DEV_PATH: "{{ lookup('env','OPNFV_RELENG_DEV_PATH') }}"
OPNFV_RELENG_VERSION: "{{ lookup('env','OPNFV_RELENG_VERSION') }}"
OPENSTACK_BIFROST_GIT_URL: "{{ lookup('env','OPENSTACK_BIFROST_GIT_URL') }}"
OPENSTACK_BIFROST_PATH: "{{ lookup('env','OPENSTACK_BIFROST_PATH') }}"
+OPENSTACK_BIFROST_DEV_PATH: "{{ lookup('env','OPENSTACK_BIFROST_DEV_PATH') }}"
OPENSTACK_BIFROST_VERSION: "{{ lookup('env','OPENSTACK_BIFROST_VERSION') }}"
OPENSTACK_OSA_GIT_URL: "{{ lookup('env','OPENSTACK_OSA_GIT_URL') }}"
OPENSTACK_OSA_PATH: "{{ lookup('env','OPENSTACK_OSA_PATH') }}"
+OPENSTACK_OSA_DEV_PATH: "{{ lookup('env','OPENSTACK_OSA_DEV_PATH') }}"
OPENSTACK_OSA_VERSION: "{{ lookup('env','OPENSTACK_OSA_VERSION') }}"
OPENSTACK_OSA_ETC_PATH: "{{ lookup('env','OPENSTACK_OSA_ETC_PATH') }}"
XCI_ANSIBLE_PIP_VERSION: "{{ lookup('env','XCI_ANSIBLE_PIP_VERSION') }}"
XCI_LOOP: "{{ lookup('env','XCI_LOOP') }}"
LOG_PATH: "{{ lookup('env','LOG_PATH') }}"
OPNFV_HOST_IP: "{{ lookup('env','OPNFV_HOST_IP') }}"
+OPNFV_SSH_HOST_KEYS_PATH: "{{ lookup('env', 'OPNFV_SSH_HOST_KEYS_PATH') }}"
set -o pipefail
#-------------------------------------------------------------------------------
-# This script must run as root
+# This script should not be run as root
#-------------------------------------------------------------------------------
-if [[ $(whoami) != "root" ]]; then
- echo "Error: This script must be run as root!"
- exit 1
+if [[ $(whoami) == "root" ]]; then
+ echo "WARNING: This script should not be run as root!"
+ echo "Elevated privileges are aquired automatically when necessary"
+ echo "Waiting 10s to give you a chance to stop the script (Ctrl-C)"
+ for x in $(seq 10 -1 1); do echo -n "$x..."; sleep 1; done
fi
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
echo "Info: Setting up target hosts for openstack-ansible"
echo "-----------------------------------------------------------------------"
-sudo -E /bin/sh -c "ssh root@$OPNFV_HOST_IP openstack-ansible \
+ssh root@$OPNFV_HOST_IP "openstack-ansible \
$OPENSTACK_OSA_PATH/playbooks/setup-hosts.yml" | \
tee $LOG_PATH/setup-hosts.log
echo "-----------------------------------------------------------------------"
echo "Info: Setting up infrastructure"
echo "-----------------------------------------------------------------------"
echo "xci: running ansible playbook setup-infrastructure.yml"
-sudo -E /bin/sh -c "ssh root@$OPNFV_HOST_IP openstack-ansible \
+ssh root@$OPNFV_HOST_IP "openstack-ansible \
$OPENSTACK_OSA_PATH/playbooks//setup-infrastructure.yml" | \
tee $LOG_PATH/setup-infrastructure.log
echo "-----------------------------------------------------------------------"
#-------------------------------------------------------------------------------
echo "Info: Verifying database cluster"
echo "-----------------------------------------------------------------------"
-sudo -E /bin/sh -c "ssh root@$OPNFV_HOST_IP ansible -i $OPENSTACK_OSA_PATH/playbooks/inventory/ \
+ssh root@$OPNFV_HOST_IP "ansible -i $OPENSTACK_OSA_PATH/playbooks/inventory/ \
galera_container -m shell \
-a "mysql -h localhost -e 'show status like \"%wsrep_cluster_%\";'"" \
| tee $LOG_PATH/galera.log
#-------------------------------------------------------------------------------
echo "Info: Installing OpenStack on target hosts"
echo "-----------------------------------------------------------------------"
-sudo -E /bin/sh -c "ssh root@$OPNFV_HOST_IP openstack-ansible \
+ssh root@$OPNFV_HOST_IP "openstack-ansible \
$OPENSTACK_OSA_PATH/playbooks/setup-openstack.yml" | \
tee $LOG_PATH/opnfv-setup-openstack.log
echo "-----------------------------------------------------------------------"
parser.add_argument("-c", "--config-file", dest='config_file',
help="Config file location")
args = parser.parse_args(argv)
- CONF = config.APIConfig().parse(args.config_file)
+ if args.config_file:
+ config.Config.CONFIG = args.config_file
+ CONF = config.Config()
def get_db():
return swagger.Application(
url_mappings.mappings,
db=get_db(),
- debug=CONF.api_debug_on,
- auth=CONF.api_authenticate_on
+ debug=CONF.api_debug,
+ auth=CONF.api_authenticate
)
import os
-class ParseError(Exception):
- """
- Custom exception class for config file
- """
-
- def __init__(self, message):
- self.msg = message
-
- def __str__(self):
- return 'error parsing config file : %s' % self.msg
-
-
-class APIConfig(object):
- """
- The purpose of this class is to load values correctly from the config file.
- Each key is declared as an attribute in __init__() and linked in parse()
- """
+class Config(object):
+ CONFIG = None
def __init__(self):
- self._set_default_config()
- self.mongo_url = None
- self.mongo_dbname = None
- self.api_port = None
- self.api_debug_on = None
- self.api_authenticate_on = None
- self._parser = None
- self.swagger_base_url = None
+ self.file = self.CONFIG if self.CONFIG else self._default_config()
+ self._parse()
- def _set_default_config(self):
- venv = os.getenv('VIRTUAL_ENV')
- self._default_config = os.path.join('/' if not venv else venv,
- 'etc/opnfv_testapi/config.ini')
+ def _parse(self):
+ if not os.path.exists(self.file):
+ raise Exception("%s not found" % self.file)
- def _get_parameter(self, section, param):
- try:
- return self._parser.get(section, param)
- except ConfigParser.NoOptionError:
- raise ParseError("No parameter: [%s.%s]" % (section, param))
-
- def _get_int_parameter(self, section, param):
- try:
- return int(self._get_parameter(section, param))
- except ValueError:
- raise ParseError("Not int: [%s.%s]" % (section, param))
+ config = ConfigParser.RawConfigParser()
+ config.read(self.file)
+ self._parse_section(config)
- def _get_bool_parameter(self, section, param):
- result = self._get_parameter(section, param)
- if str(result).lower() == 'true':
- return True
- if str(result).lower() == 'false':
- return False
+ def _parse_section(self, config):
+ [self._parse_item(config, section) for section in (config.sections())]
- raise ParseError(
- "Not boolean: [%s.%s : %s]" % (section, param, result))
+ def _parse_item(self, config, section):
+ [setattr(self, '{}_{}'.format(section, k), self._parse_value(v))
+ for k, v in config.items(section)]
@staticmethod
- def parse(config_location=None):
- obj = APIConfig()
-
- if config_location is None:
- config_location = obj._default_config
-
- if not os.path.exists(config_location):
- raise ParseError("%s not found" % config_location)
-
- obj._parser = ConfigParser.SafeConfigParser()
- obj._parser.read(config_location)
-
- # Linking attributes to keys from file with their sections
- obj.mongo_url = obj._get_parameter("mongo", "url")
- obj.mongo_dbname = obj._get_parameter("mongo", "dbname")
-
- obj.api_port = obj._get_int_parameter("api", "port")
- obj.api_debug_on = obj._get_bool_parameter("api", "debug")
- obj.api_authenticate_on = obj._get_bool_parameter("api",
- "authenticate")
-
- obj.swagger_base_url = obj._get_parameter("swagger", "base_url")
+ def _parse_value(value):
+ try:
+ value = int(value)
+ except:
+ if str(value).lower() == 'true':
+ value = True
+ elif str(value).lower() == 'false':
+ value = False
+ return value
- return obj
+ @staticmethod
+ def _default_config():
+ is_venv = os.getenv('VIRTUAL_ENV')
+ return os.path.join('/' if not is_venv else is_venv,
+ 'etc/opnfv_testapi/config.ini')
-import ConfigParser
import os
-import pytest
-
from opnfv_testapi.common import config
-@pytest.fixture()
-def config_dir():
- return os.path.dirname(__file__)
-
-
-@pytest.mark.parametrize('exception, config_file, excepted', [
- (config.ParseError, None, '/etc/opnfv_testapi/config.ini not found'),
- (ConfigParser.NoSectionError, 'nosection.ini', 'No section:'),
- (config.ParseError, 'noparam.ini', 'No parameter:'),
- (config.ParseError, 'notint.ini', 'Not int:'),
- (config.ParseError, 'notboolean.ini', 'Not boolean:')])
-def pytest_config_exceptions(config_dir, exception, config_file, excepted):
- file = '{}/{}'.format(config_dir, config_file) if config_file else None
- with pytest.raises(exception) as error:
- config.APIConfig().parse(file)
- assert excepted in str(error.value)
-
-
def test_config_success():
- config_dir = os.path.join(os.path.dirname(__file__),
- '../../../../etc/config.ini')
- conf = config.APIConfig().parse(config_dir)
+ config_file = os.path.join(os.path.dirname(__file__),
+ '../../../../etc/config.ini')
+ config.Config.CONFIG = config_file
+ conf = config.Config()
assert conf.mongo_url == 'mongodb://127.0.0.1:27017/'
assert conf.mongo_dbname == 'test_results_collection'
assert conf.api_port == 8000
- assert conf.api_debug_on is True
- assert conf.api_authenticate_on is False
+ assert conf.api_debug is True
+ assert conf.api_authenticate is False
assert conf.swagger_base_url == 'http://localhost:8000'