From a4e6e7fa47d92683fe201a25c2835fce3f08aa65 Mon Sep 17 00:00:00 2001 From: Lukasz Zajaczkowski Date: Fri, 22 Apr 2016 13:42:39 +0200 Subject: [PATCH] Add configuration for e2e tests --- cluster/openstack/config-test.sh | 19 +++++++++++++++++++ cluster/openstack/util.sh | 20 ++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 cluster/openstack/config-test.sh diff --git a/cluster/openstack/config-test.sh b/cluster/openstack/config-test.sh new file mode 100644 index 00000000000..1ed3e5eedf4 --- /dev/null +++ b/cluster/openstack/config-test.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +# Copyright 2015 The Kubernetes Authors All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +## Contains configuration values for interacting with the Ubuntu cluster in test mode +KUBE_ROOT=$(dirname "${BASH_SOURCE}")/../.. +source "${KUBE_ROOT}/cluster/openstack/config-default.sh" diff --git a/cluster/openstack/util.sh b/cluster/openstack/util.sh index a0652b9203b..7afb4f22019 100644 --- a/cluster/openstack/util.sh +++ b/cluster/openstack/util.sh @@ -252,3 +252,23 @@ function kube-down { source "${ROOT}/openrc-default.sh" heat stack-delete ${STACK_NAME} } + +# Perform preparations required to run e2e tests +function prepare-e2e { + echo "TODO: prepare-e2e" 1>&2 +} + +function test-build-release { + echo "test-build-release() " 1>&2 +} + +# Must ensure that the following ENV vars are set +function detect-master { + + source "${ROOT}/${KUBE_CONFIG_FILE:-"config-default.sh"}" + source "${ROOT}/openrc-default.sh" + + export KUBE_MASTER_IP=$(nova show "${STACK_NAME}"-master | awk '$3=="network" {print $6}') + + echo "KUBE_MASTER_IP: $KUBE_MASTER_IP" 1>&2 +}