blob: 30d4fdbf2e2f9df7abb0283e00b4f523bf37e9fd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
From 40fda813b0c33faa060f44dd2b078b8a8674b793 Mon Sep 17 00:00:00 2001
From: Jan Chaloupka <jchaloup@redhat.com>
Date: Mon, 14 Nov 2016 12:02:27 +0100
Subject: [PATCH] make test-cmd run over hyperkube based kubectl
---
src/k8s.io/kubernetes/hack/lib/test.sh | 3 ++-
src/k8s.io/kubernetes/hack/make-rules/test-cmd.sh | 14 +-------------
2 files changed, 3 insertions(+), 14 deletions(-)
diff --git a/hack/lib/test.sh b/hack/lib/test.sh
index 00f7ceb..26d9d85 100644
--- a/hack/lib/test.sh
+++ b/hack/lib/test.sh
@@ -33,8 +33,9 @@ kube::test::get_object_assert() {
local request=$2
local expected=$3
local args=${4:-}
+ local get_args=${5:-}
- res=$(eval kubectl ${args} get "${kube_flags[@]}" $object -o go-template=\"$request\")
+ res=$(eval kubectl ${args} get "${kube_flags[@]}" ${get_args} $object -o go-template=\"$request\")
if [[ "$res" =~ ^$expected$ ]]; then
echo -n ${green}
diff --git a/hack/make-rules/test-cmd.sh b/hack/make-rules/test-cmd.sh
index e77b06d..b1cc52e 100755
--- a/hack/make-rules/test-cmd.sh
+++ b/hack/make-rules/test-cmd.sh
@@ -147,13 +147,6 @@ function wait-for-pods-with-label()
kube::util::trap_add cleanup EXIT SIGINT
kube::util::ensure-temp-dir
-BINS=(
- cmd/kubectl
- cmd/kube-apiserver
- cmd/kube-controller-manager
-)
-make -C "${KUBE_ROOT}" WHAT="${BINS[*]}"
-
kube::etcd::start
ETCD_HOST=${ETCD_HOST:-127.0.0.1}
@@ -190,11 +183,6 @@ kube::log::status "Running kubectl with no options"
# Only run kubelet on platforms it supports
if [[ "$(go env GOHOSTOS)" == "linux" ]]; then
-BINS=(
- cmd/kubelet
-)
-make -C "${KUBE_ROOT}" WHAT="${BINS[*]}"
-
kube::log::status "Starting kubelet in masterless mode"
"${KUBE_OUTPUT_HOSTBIN}/kubelet" \
--really-crash-for-testing=true \
@@ -456,7 +444,7 @@ runTests() {
# Describe command should print events information when show-events=true
kube::test::describe_resource_events_assert pods true
### Validate Export ###
- kube::test::get_object_assert 'pods/valid-pod' "{{.metadata.namespace}} {{.metadata.name}}" '<no value> valid-pod' "--export=true"
+ kube::test::get_object_assert 'pods/valid-pod' "{{.metadata.namespace}} {{.metadata.name}}" '<no value> valid-pod' "" "--export=true"
### Dump current valid-pod POD
output_pod=$(kubectl get pod valid-pod -o yaml --output-version=v1 "${kube_flags[@]}")
--
1.9.3
|