Skip to content

Commit

Permalink
Include overridesFolder reference in run-e2e test sceript
Browse files Browse the repository at this point in the history
  • Loading branch information
Warren Fernandes committed Mar 13, 2020
1 parent 3ee5e8e commit 2c39220
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion cmd/clusterctl/client/repository/overrides_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ func TestOverrides(t *testing.T) {
}

func TestGetLocalOverrides(t *testing.T) {
t.Run("returns contents of file succesfully", func(t *testing.T) {
t.Run("returns contents of file successfully", func(t *testing.T) {
g := NewWithT(t)
tmpDir := createTempDir(t)
defer os.RemoveAll(tmpDir)
Expand Down
10 changes: 6 additions & 4 deletions cmd/clusterctl/test/run-e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,21 +46,23 @@ cat <<EOF > "clusterctl-settings.json"
EOF

# Create a local filesystem repository for the docker provider and update clusterctl.yaml
LOCAL_CAPD_REPO_PATH="${ARTIFACTS}/testdata/docker"
LOCAL_CAPD_REPO_PATH="${ARTIFACTS}/testdata/infrastructure-docker"
mkdir -p "${LOCAL_CAPD_REPO_PATH}"
cp -r "${REPO_ROOT_ABS}/cmd/clusterctl/test/testdata/docker/${CAPD_VERSION}" "${LOCAL_CAPD_REPO_PATH}"
# We build the infrastructure-components.yaml from the capd folder and put in local repo folder
kustomize build "${REPO_ROOT_ABS}/test/infrastructure/docker/config/default/" > "${LOCAL_CAPD_REPO_PATH}/${CAPD_VERSION}/infrastructure-components.yaml"
export CLUSTERCTL_CONFIG="${ARTIFACTS}/testdata/clusterctl.yaml"
export CLUSTERCTL_CONFIG="${ARTIFACTS}/testdata/clusterctl.yaml"
cat <<EOF > "${CLUSTERCTL_CONFIG}"
providers:
- name: docker
url: ${LOCAL_CAPD_REPO_PATH}/${CAPD_VERSION}/infrastructure-components.yaml
type: InfrastructureProvider
overridesFolder:${ARTIFACTS}/testdata
DOCKER_SERVICE_DOMAIN: "cluster.local"
DOCKER_SERVICE_CIDRS: "10.128.0.0/12"
DOCKER_POD_CIDRS: "192.168.0.0/16"
DOCKER_SERVICE_CIDRS: "10.128.0.0/12"
DOCKER_POD_CIDRS: "192.168.0.0/16"
EOF

export KIND_CONFIG_FILE="${ARTIFACTS}/kind-cluster-with-extramounts.yaml"
Expand Down

0 comments on commit 2c39220

Please sign in to comment.