mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
Make libvirt-CoreOS cluster able to run e2e tests
This commit is contained in:
parent
c763fbf98a
commit
d64f0f1183
19
cluster/libvirt-coreos/config-test.sh
Normal file
19
cluster/libvirt-coreos/config-test.sh
Normal file
@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Copyright 2014 Google Inc. 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 Vagrant cluster in test mode
|
||||
KUBE_ROOT=$(dirname "${BASH_SOURCE}")/../..
|
||||
source "${KUBE_ROOT}/cluster/libvirt-coreos/config-default.sh"
|
@ -16,7 +16,7 @@
|
||||
|
||||
# A library of helper functions that each provider hosting Kubernetes must implement to use cluster/kube-*.sh scripts.
|
||||
|
||||
readonly KUBE_ROOT=$(dirname "${BASH_SOURCE}")/../..
|
||||
KUBE_ROOT=$(dirname "${BASH_SOURCE}")/../..
|
||||
readonly ROOT=$(dirname "${BASH_SOURCE}")
|
||||
source $ROOT/${KUBE_CONFIG_FILE:-"config-default.sh"}
|
||||
|
||||
@ -277,7 +277,7 @@ function test-setup {
|
||||
|
||||
# Execute after running tests to perform any required clean-up
|
||||
function test-teardown {
|
||||
echo "TODO"
|
||||
kube-down
|
||||
}
|
||||
|
||||
# Set the {KUBE_USER} and {KUBE_PASSWORD} environment values required to interact with provider
|
||||
@ -294,6 +294,11 @@ function teardown-monitoring-firewall {
|
||||
echo "TODO" 1>&2
|
||||
}
|
||||
|
||||
# Perform preparations required to run e2e tests
|
||||
function prepare-e2e() {
|
||||
echo "libvirt-coreos doesn't need special preparations for e2e tests" 1>&2
|
||||
}
|
||||
|
||||
function setup-logging-firewall {
|
||||
echo "TODO: setup logging"
|
||||
}
|
||||
|
@ -103,10 +103,16 @@ else
|
||||
auth_config=()
|
||||
fi
|
||||
|
||||
if [[ "$KUBERNETES_PROVIDER" == "libvirt-coreos" ]]; then
|
||||
host="http://${KUBE_MASTER_IP-}:8080"
|
||||
else
|
||||
host="https://${KUBE_MASTER_IP-}"
|
||||
fi
|
||||
|
||||
# Use the kubectl binary from the same directory as the e2e binary.
|
||||
export PATH=$(dirname "${e2e}"):"${PATH}"
|
||||
"${e2e}" "${auth_config[@]:+${auth_config[@]}}" \
|
||||
--host="https://${KUBE_MASTER_IP-}" \
|
||||
--host="$host" \
|
||||
--provider="${KUBERNETES_PROVIDER}" \
|
||||
--gce_project="${PROJECT:-}" \
|
||||
--gce_zone="${ZONE:-}" \
|
||||
|
Loading…
Reference in New Issue
Block a user