Skip to content

Commit

Permalink
Add a Lighthouse-specific upgrade test (#400)
Browse files Browse the repository at this point in the history
This changes upgrade-e2e to perform the following steps:
* deploy the latest release of Submariner and Lighthouse
* export an Nginx service (using the matching subctl)
* deploy the development release of Submariner and Lighthouse
* check that the ServiceExport object has been upgraded
* check that the ServiceImport object has been synced
* run the existing e2e suite

Signed-off-by: Stephen Kitt <[email protected]>
  • Loading branch information
skitt authored Dec 8, 2020
1 parent d082114 commit 0c57b14
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,19 @@ bin/lighthouse-coredns: vendor/modules.txt $(shell find pkg/coredns)
deploy: images clusters
./scripts/$@ $(DEPLOY_ARGS)

# Lighthouse-specific upgrade test:
# deploy latest, start nginx service, export it, upgrade, check service
upgrade-e2e: deploy-latest export-nginx deploy check-nginx e2e

# This relies on deploy-latest to get the original subctl
export-nginx: deploy-latest
sed s/nginx-demo/nginx-upgrade/ /opt/shipyard/scripts/resources/nginx-demo.yaml | KUBECONFIG=output/kubeconfigs/kind-config-cluster1 kubectl apply -f -
KUBECONFIG=output/kubeconfigs/kind-config-cluster1 ~/.local/bin/subctl export service nginx-upgrade -n default

check-nginx:
KUBECONFIG=output/kubeconfigs/kind-config-cluster1 kubectl get serviceexports.multicluster.x-k8s.io -n default nginx-upgrade
KUBECONFIG=output/kubeconfigs/kind-config-cluster2 kubectl get serviceimports.multicluster.x-k8s.io -n submariner-operator nginx-upgrade-default-cluster1

$(TARGETS): vendor/modules.txt
./scripts/$@

Expand Down

0 comments on commit 0c57b14

Please sign in to comment.