Skip to content
This repository has been archived by the owner on Dec 4, 2023. It is now read-only.

Commit

Permalink
Move systemtests roles (#1349)
Browse files Browse the repository at this point in the history
* Move systemtests roles

* Fix setup-kubernetes use moved playbook

* Rename vars

* Fix use python style boolean values in inventory files
  • Loading branch information
kornys committed Jun 13, 2018
1 parent e9105a0 commit 765c437
Show file tree
Hide file tree
Showing 26 changed files with 39 additions and 41 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ before_install:
- npm install -g mocha mocha-junit-reporter
- npm install rhea debug
script:
- "./.travis/setup-kubernetes.sh 'templates/install' ${OPENSHIFT} ${MINIKUBE} ${KUBECTL}"
- "./.travis/setup-kubernetes.sh 'systemtests' ${OPENSHIFT} ${MINIKUBE} ${KUBECTL}"
- "./.travis/build.sh"
after_failure:
- "./.travis/upload-artifacts.sh false"
Expand Down
4 changes: 2 additions & 2 deletions .travis/setup-kubernetes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
# {3} url to minikube
# {4} url to kubectl

ENMASSE_DIR=${1}
SYSTEMTESTS_DIR=${1}
OPENSHIFT_CLIENT_URL=${2:-"https://github.com/openshift/origin/releases/download/v3.7.0/openshift-origin-client-tools-v3.7.0-7ed6862-linux-64bit.tar.gz"}
MINIKUBE_RELEASE_URL=${3:-"https://storage.googleapis.com/minikube/releases/v0.25.2/minikube-linux-amd64"}
KUBECTL_RELEASE_URL=${4:-"https://storage.googleapis.com/kubernetes-release/release/v1.8.7/bin/linux/amd64/kubectl"}
ansible-playbook ${ENMASSE_DIR}/ansible/playbooks/openshift/environment.yml \
ansible-playbook ${SYSTEMTESTS_DIR}/ansible/playbooks/environment.yml \
--extra-vars "openshift_client_url=${OPENSHIFT_CLIENT_URL} minikube_url=${MINIKUBE_RELEASE_URL} kubectl_url=${KUBECTL_RELEASE_URL}" \
-t openshift,kubectl,minikube

Expand Down
2 changes: 1 addition & 1 deletion Jenkinsfile-long
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ pipeline {
stage('start openshift') {
steps {
timeout(time: 10, unit: 'MINUTES') {
sh './systemtests/scripts/setup-openshift.sh "templates/install"'
sh './systemtests/scripts/setup-openshift.sh "systemtests"'
sh 'sudo chmod -R 777 /var/lib/origin/openshift.local.config'
}
}
Expand Down
2 changes: 1 addition & 1 deletion Jenkinsfile-pr
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ pipeline {
stage('start openshift') {
steps {
timeout(time: 10, unit: 'MINUTES') {
sh './systemtests/scripts/setup-openshift.sh "templates/install"'
sh './systemtests/scripts/setup-openshift.sh "systemtests"'
sh 'sudo chmod -R 777 /var/lib/origin/openshift.local.config'
}
}
Expand Down
2 changes: 1 addition & 1 deletion Jenkinsfile-tests
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ pipeline {
stage('start openshift') {
steps {
timeout(time: 10, unit: 'MINUTES') {
sh './systemtests/scripts/setup-openshift.sh "templates/install"'
sh './systemtests/scripts/setup-openshift.sh "systemtests"'
sh 'sudo chmod -R 777 /var/lib/origin/openshift.local.config'
}
}
Expand Down
13 changes: 13 additions & 0 deletions systemtests/ansible/inventory/systemtests.inventory
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[enmasse]
localhost ansible_connection=local

[enmasse:vars]
namespace=enmasseci
multitenant=True
enable_rbac=True
api_server=True
register_api_server=False
service_catalog=True
secure_api_server=False
keycloak_admin_password=admin
authentication_services=["none", "standard"]
1 change: 1 addition & 0 deletions systemtests/ansible/playbooks/roles
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
enmasse_tmp_dir: '/tmp/enmasse/'
# vars for clients tasks
systemtests_dir: "{{ playbook_dir }}../../../../../../systemtests"
systemtests_dir: "{{ playbook_dir }}../../"
client_executable_folder: "{{ systemtests_dir }}/client_executable"
cli_java_git_path: "{{ systemtests_dir }}/cli-java"
rhea_path: "{{ client_executable_folder }}/rhea"
Expand Down
11 changes: 5 additions & 6 deletions systemtests/scripts/setup-openshift.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
#!/bin/bash
SCRIPTDIR=$(dirname $0)

curdir="$(dirname $(readlink -f ${0}))"
source "${curdir}/../../scripts/logger.sh"
source "${curdir}/test_func.sh"
CURDIR="$(dirname $(readlink -f ${0}))"
source "${CURDIR}/../../scripts/logger.sh"
source "${CURDIR}/test_func.sh"

#parameters:
# {1} path to folder with installation scripts, roles,... (usually templates/install)
# {2} url to OpenShift origin client (default value is set to oc version v3.7.0)
ENMASSE_DIR=${1}
SYSTEMTESTS_DIR=${1}
OPENSHIFT_CLIENT_URL=${2:-"https://github.com/openshift/origin/releases/download/v3.7.0/openshift-origin-client-tools-v3.7.0-7ed6862-linux-64bit.tar.gz"}
OPENSHIFT_URL=${OPENSHIFT_URL:-https://localhost:8443}
DOCKER=${DOCKER:-docker}
Expand All @@ -17,7 +16,7 @@ DOCKER=${DOCKER:-docker}
stop_and_check_openshift
check_if_ansible_ready

ansible-playbook ${ENMASSE_DIR}/ansible/playbooks/openshift/environment.yml \
ansible-playbook ${SYSTEMTESTS_DIR}/ansible/playbooks/environment.yml \
--extra-vars "openshift_client_url=${OPENSHIFT_CLIENT_URL}" -t openshift,kubectl

clean_docker_images
Expand Down
5 changes: 3 additions & 2 deletions systemtests/scripts/test_func.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ function download_enmasse() {
}

function setup_test() {
ENMASSE_DIR=$1
TEMPLATES_INSTALL_DIR=$1
KUBEADM=$2

export OPENSHIFT_URL=${OPENSHIFT_URL:-https://localhost:8443}
Expand All @@ -29,7 +29,8 @@ function setup_test() {
oc login -u ${OPENSHIFT_USER} -p ${OPENSHIFT_PASSWD} --insecure-skip-tls-verify=true ${OPENSHIFT_URL}
oc adm --config ${KUBEADM} policy add-cluster-role-to-user cluster-admin $OPENSHIFT_USER
export OPENSHIFT_TOKEN=`oc whoami -t`
ansible-playbook ${ENMASSE_DIR}/ansible/playbooks/openshift/systemtests.yml --extra-vars "namespace=${OPENSHIFT_PROJECT} admin_user=${OPENSHIFT_USER}"
ansible-playbook ${CURDIR}/../ansible/playbooks/systemtests-dependencies.yml
ansible-playbook ${TEMPLATES_INSTALL_DIR}/ansible/playbooks/openshift/install.yml -i ${CURDIR}/../ansible/inventory/systemtests.inventory --extra-vars "namespace=${OPENSHIFT_PROJECT} admin_user=${OPENSHIFT_USER}"
}

function wait_until_up(){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -269,11 +269,9 @@ void testLargeMessages(JmsProvider jmsProvider) throws Exception {
"jmsCliId", addressQueue);
connection.start();

sendReceiveLargeMessage(jmsProvider, 90, addressQueue, 1);
sendReceiveLargeMessage(jmsProvider, 50, addressQueue, 1);
sendReceiveLargeMessage(jmsProvider, 10, addressQueue, 1);
sendReceiveLargeMessage(jmsProvider, 1, addressQueue, 1);
sendReceiveLargeMessage(jmsProvider, 90, addressQueue, 1, DeliveryMode.PERSISTENT);
sendReceiveLargeMessage(jmsProvider, 50, addressQueue, 1, DeliveryMode.PERSISTENT);
sendReceiveLargeMessage(jmsProvider, 10, addressQueue, 1, DeliveryMode.PERSISTENT);
sendReceiveLargeMessage(jmsProvider, 1, addressQueue, 1, DeliveryMode.PERSISTENT);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ localhost ansible_connection=local

[enmasse:vars]
namespace=enmasse
multitenant=true
enable_rbac=true
api_server=true
register_api_server=true
secure_api_server=true
multitenant=True
enable_rbac=True
api_server=True
register_api_server=True
secure_api_server=True
keycloak_admin_password=admin
authentication_services=["standard"]
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ localhost ansible_connection=local

[enmasse:vars]
namespace=enmasse
multitenant=true
enable_rbac=true
service_catalog=true
multitenant=True
enable_rbac=True
service_catalog=True
keycloak_admin_password=admin
authentication_services=["standard"]
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
localhost ansible_connection=local

[enmasse:vars]
multitenant=false
multitenant=False
address_space_type=brokered
address_space_plan=unlimited-brokered
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
localhost ansible_connection=local

[enmasse:vars]
multitenant=false
multitenant=False
address_space_type=standard
address_space_plan=unlimited-standard
14 changes: 0 additions & 14 deletions templates/install/ansible/playbooks/openshift/systemtests.yml

This file was deleted.

0 comments on commit 765c437

Please sign in to comment.