Skip to content

Commit 64f4157

Browse files
committed
decouple kind config from tests
1 parent 3b79a50 commit 64f4157

File tree

3 files changed

+9
-19
lines changed

3 files changed

+9
-19
lines changed

tests/custom-network/setup_suite.bash

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,9 @@ function setup_suite {
1818
--subnet=172.20.0.0/16 $KIND_EXPERIMENTAL_DOCKER_NETWORK
1919

2020
# create cluster
21-
cat <<EOF | kind create cluster \
21+
kind create cluster \
2222
--name $CLUSTER_NAME \
23-
-v7 --wait 1m --retain --config=-
24-
kind: Cluster
25-
apiVersion: kind.x-k8s.io/v1alpha4
26-
nodes:
27-
- role: control-plane
28-
- role: worker
29-
- role: worker
30-
EOF
23+
-v7 --wait 1m --retain --config="$BATS_TEST_DIRNAME/../kind.yaml"
3124

3225
# build & run cloud-provider-kind
3326
cd "$BATS_TEST_DIRNAME"/../.. && make

tests/kind.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
kind: Cluster
2+
apiVersion: kind.x-k8s.io/v1alpha4
3+
nodes:
4+
- role: control-plane
5+
- role: worker
6+
- role: worker

tests/setup_suite.bash

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,7 @@ function setup_suite {
1212
rm -rf "$ARTIFACTS_DIR"/*
1313

1414
# create cluster
15-
cat <<EOF | kind create cluster \
16-
--name $CLUSTER_NAME \
17-
-v7 --wait 1m --retain --config=-
18-
kind: Cluster
19-
apiVersion: kind.x-k8s.io/v1alpha4
20-
nodes:
21-
- role: control-plane
22-
- role: worker
23-
- role: worker
24-
EOF
15+
kind create cluster --name $CLUSTER_NAME -v7 --wait 1m --retain --config="$BATS_TEST_DIRNAME/kind.yaml"
2516

2617
cd "$BATS_TEST_DIRNAME"/.. && make
2718
nohup "$BATS_TEST_DIRNAME"/../bin/cloud-provider-kind -v 2 --gateway-channel=standard --enable-log-dumping --logs-dir "$ARTIFACTS_DIR" > "$ARTIFACTS_DIR"/ccm-kind.log 2>&1 &

0 commit comments

Comments
 (0)