Skip to content

Commit

Permalink
support e2e vpc test flow
Browse files Browse the repository at this point in the history
Signed-off-by: Prajyot-Parab <[email protected]>
  • Loading branch information
Prajyot-Parab committed Sep 29, 2022
1 parent 2c1ab12 commit 375b212
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 2 deletions.
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,9 @@ generate-go-conversions-core: $(CONVERSION_GEN)

.PHONY: generate-e2e-templates
generate-e2e-templates: $(KUSTOMIZE)
ifneq ($(E2E_FLAVOR), vpc)
$(KUSTOMIZE) build $(E2E_TEMPLATES)/cluster-template-md-remediation --load-restrictor LoadRestrictionsNone > $(E2E_TEMPLATES)/cluster-template-md-remediation.yaml
endif

.PHONY: modules
modules: ## Runs go mod to ensure modules are up to date
Expand Down
19 changes: 18 additions & 1 deletion scripts/ci-e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,19 @@ prerequisites_powervs(){
export LOGLEVEL=5
}

prerequisites_vpc(){
# Assigning VPC variables
export IBMVPC_REGION=${REGION}
export IBMVPC_ZONE="${REGION}-1"
export IBMVPC_RESOURCEGROUP=${IBMVPC_RESOURCEGROUP:-"fa5405a58226402f9a5818cb9b8a5a8a"}
export IBMVPC_NAME="capi-vpc-$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | head --bytes 5)"
export IBMVPC_IMAGE_ID=${IBMVPC_IMAGE_ID:-"r006-c6f5840c-fd6e-4b40-97ac-fbf13e1c09cd"}
export IBMVPC_PROFILE=${IBMVPC_PROFILE:-"bx2-4x16"}
export IBMVPC_SSHKEY_ID=${IBMVPC_SSHKEY_ID:-"r006-c2ae2255-9961-4654-80ea-ea9091c4decd"}
# Setting controller loglevel to allow debug logs from the VPC client
export LOGLEVEL=5
}

main(){
# If BOSKOS_HOST is set then acquire an IBM Cloud resource from Boskos.
if [ -n "${BOSKOS_HOST:-}" ]; then
Expand Down Expand Up @@ -132,8 +145,12 @@ main(){
init_network_powervs
fi

if [[ "${E2E_FLAVOR}" == "vpc" ]]; then
prerequisites_vpc
fi

# Run the e2e tests
make test-e2e
make test-e2e E2E_FLAVOR=${E2E_FLAVOR}
test_status="${?}"
echo TESTSTATUS="${test_status}"

Expand Down
2 changes: 1 addition & 1 deletion test/e2e/config/ibmcloud-e2e-vpc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ variables:
intervals:
default/wait-controllers: ["3m", "10s"]
default/wait-cluster: ["20m", "10s"]
default/wait-control-plane: ["30m", "10s"]
default/wait-control-plane: ["60m", "10s"]
default/wait-worker-nodes: ["30m", "10s"]
default/wait-delete-cluster: ["20m", "10s"]
default/wait-machine-upgrade: ["50m", "10s"]
Expand Down

0 comments on commit 375b212

Please sign in to comment.