Skip to content
Snippets Groups Projects
Commit b4d4e3cb authored by Nikolay Stanchev's avatar Nikolay Stanchev
Browse files

Merged mediaComponentConfig into endpointConfig

parents d7b13f03 deb0d3e0
No related branches found
No related tags found
No related merge requests found
#!/bin/bash
mkdir .build-config
git rev-list --count integration > .build-config/git-commit-count
git describe --all --long > .build-config/git-commit-version
\ No newline at end of file
CI_COMMIT_REF_NAME=`git rev-parse --abbrev-ref HEAD`
CI_COMMIT_SHA=`git rev-parse HEAD`
echo $CI_COMMIT_REF_NAME"-"$CI_COMMIT_SHA > clmctest/git-commit-ref
......@@ -3,4 +3,5 @@
*__pycache__*
*__init__.pyc
*egg-info*
*git-commit-ref*
ubuntu-xenial-16.04-cloudimg-console.log
stages:
- test:scripts
- test:monitoring
- test:inputs
test:scripts:
stage: test:scripts
# before_script:
# - vagrant --fixture=scripts -- destroy --force
- build
- test
- clean
build:tests:
stage: build
script:
- vagrant --fixture=scripts -- up
- vagrant --fixture=scripts -- ssh test-runner -- -tt "cd /vagrant && pytest clmctest/scripts/"
after_script:
- vagrant --fixture=scripts -- destroy --force
when: manual
test:monitoring:
stage: test:monitoring
before_script:
- vagrant --fixture=monitoring -- destroy --force
- python setup.py sdist --dist-dir=build
artifacts:
paths:
- build/clmctest-SNAPSHOT.tar.gz
expire_in: 1 day
test:all:
stage: test
dependencies:
- build:tests
script:
- vagrant --fixture=scripts -- up
- vagrant --fixture=scripts -- ssh test-runner -- -tt "pip3 install /vagrant/build/clmctest-SNAPSHOT.tar.gz"
- vagrant --fixture=scripts -- ssh test-runner -- -tt "pytest -s --pyargs clmctest.scripts"
- vagrant --fixture=monitoring -- up
- vagrant --fixture=monitoring -- ssh test-runner -- -tt "cd /vagrant && pytest clmctest/monitoring/"
after_script:
- vagrant --fixture=monitoring -- destroy --force
when: manual
test:inputs:
stage: test:inputs
before_script:
- vagrant --fixture=inputs -- destroy --force
script:
- vagrant --fixture=monitoring -- ssh test-runner -- -tt "pytest -s --pyargs clmctest.monitoring"
- vagrant --fixture=inputs -- up
- vagrant --fixture=inputs -- ssh test-runner -- -tt "cd /vagrant && pytest clmctest/inputs/"
after_script:
- vagrant --fixture=inputs -- destroy --force
when: manual
- vagrant --fixture=inputs -- ssh test-runner -- -tt "pytest -s --pyargs clmctest.inputs"
when: on_success
clean:
stage: clean
script:
- scripts/build/deleteallvms.sh
when: always
\ No newline at end of file
include MANIFEST.in
recursive-include clmctest *.yml *.sh
\ No newline at end of file
recursive-include clmctest *.yml *.sh *.json *.conf
\ No newline at end of file
#!/usr/bin/python3
import pytest
import time
import yaml
import pkg_resources
from influxdb import InfluxDBClient
......@@ -24,11 +25,17 @@ def telegraf_agent_config(request):
@pytest.fixture(params=[{'database': 'CLMCMetrics'}], scope='module')
def influxdb(telegraf_agent_config, request):
"""
Creates an Influx DB client for the CLMC metrics database
Creates an Influx DB client for the CLMC metrics database with an empty database
:param telegraf_agent_config: the fixture returning the yaml configuration
:param request: access the parameters of the fixture
:return: the created Influx DB client
"""
db = InfluxDBClient(host=telegraf_agent_config['hosts'][0]['ip_address'], port=8086, database=request.param['database'], timeout=10)
db.drop_database(request.param['database'])
return InfluxDBClient(host=telegraf_agent_config['hosts'][0]['ip_address'], port=8086, database=request.param['database'], timeout=10)
# wait 20 seconds for the 1st measurement to arrive from agents before returning
time.sleep(30)
return db
......@@ -35,7 +35,7 @@ hosts:
service_name: "nginx"
forward_ports:
- guest: 80
host: 8082
host: 8882
ip_address: "203.0.113.102"
location: "DC1"
sfc_id: "MS_Template_1"
......@@ -52,7 +52,7 @@ hosts:
service_name: "mongo"
forward_ports:
- guest: 80
host: 8083
host: 8883
ip_address: "203.0.113.103"
location: "DC1"
sfc_id: "MS_Template_1"
......@@ -69,7 +69,7 @@ hosts:
service_name: "ffmpeg"
forward_ports:
- guest: 80
host: 8084
host: 8884
ip_address: "203.0.113.104"
location: "DC1"
sfc_id: "MS_Template_1"
......@@ -86,7 +86,7 @@ hosts:
service_name: "host"
forward_ports:
- guest: 80
host: 8085
host: 8885
ip_address: "203.0.113.105"
location: "DC1"
sfc_id: "MS_Template_1"
......
......@@ -3,5 +3,5 @@ hosts:
cpus: 1
memory: 2048
disk: "10GB"
ip_address: "200.0.113.150"
ip_address: "203.0.113.150"
\ No newline at end of file
#!/bin/bash
vboxmanage list vms | awk ' {print $1} ' | awk -F',' '{gsub(/"/, "", $1); print $1}' > runningvms
while read vm_id; do
echo $vm_id
vboxmanage controlvm $vm_id poweroff
vboxmanage unregistervm $vm_id --delete
done <runningvms
rm runningvms
......@@ -6,17 +6,15 @@ def read(fname):
setup(
name = "clmctest",
#version = read('.build-config/git-commit-version'),
version = "SNAPSHOT",
author = "Michael Boniface",
author_email = "mjb@it-innovation.soton.ac.uk",
description = "FLAME CLMC Testing Module",
license = "license",
keywords = "example documentation",
url = "http://packages.python.org/an_example_pypi_project",
keywords = "FLAME CLMC test",
packages=find_packages(exclude=["services"]),
include_package_data=True,
package_data={'': ['*.yml', '*.sh']},
package_data={'': ['git-commit-ref', '*.yml', '*.sh', '*.json', '*.conf']},
long_description="long description",
classifiers=[
"Development Status :: Alpha",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment