Skip to content

Commit 22fa1fb

Browse files
committed
Makefile/e2e: ensure cloud-config.yaml exists
1 parent 12c0845 commit 22fa1fb

File tree

2 files changed

+40
-1
lines changed

2 files changed

+40
-1
lines changed

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,8 @@ run-e2e: e2e-essentials ## Run e2e testing. JOB is an optional REGEXP to select
292292
kind delete clusters capi-test
293293

294294
run-e2e-smoke:
295-
hack/ensure-kind.sh
295+
./hack/ensure-kind.sh
296+
./hack/ensure-cloud-config-yaml.sh
296297
JOB="\"CAPC E2E SMOKE TEST\"" $(MAKE) run-e2e
297298

298299
##@ Cleanup

hack/ensure-cloud-config-yaml.sh

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
#!/usr/bin/env bash
2+
3+
# Copyright 2019 The Kubernetes Authors.
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
17+
set -o errexit
18+
set -o nounset
19+
set -o pipefail
20+
21+
# This ensures that cloud-config.yaml exists which is required for e2e smoke test
22+
if [ ! -f "cloud-config.yaml" ];then
23+
echo "cloud-config.yaml is not found, creating"
24+
cat >cloud-config.yaml <<EOF
25+
apiVersion: v1
26+
kind: Secret
27+
metadata:
28+
name: secret1
29+
namespace: default
30+
type: Opaque
31+
stringData:
32+
api-key: XXXX
33+
secret-key: XXXX
34+
api-url: http://1.2.3.4:8080/client/api
35+
verify-ssl: "false"
36+
EOF
37+
38+
fi

0 commit comments

Comments
 (0)