Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix system tests after latest Shipyard changes #2222

Merged
merged 1 commit into from
Sep 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ dockertogoarch = $(patsubst arm/v7,arm,$(1))

PLATFORMS ?= linux/amd64,linux/arm64
IMAGES = submariner-operator submariner-operator-index
PRELOAD_IMAGES := submariner-operator submariner-gateway submariner-globalnet submariner-route-agent lighthouse-agent lighthouse-coredns
PRELOAD_IMAGES := submariner-operator
MULTIARCH_IMAGES := submariner-operator

ifneq (,$(filter ovn,$(USING)))
Expand Down
13 changes: 10 additions & 3 deletions scripts/test/system.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@ function create_subm_vars() {
declare_cidrs
natEnabled=false

subm_gateway_image_repo="localhost:5000"
subm_gateway_image_tag=local
# The version is set in api/v1alpha1/versions.go but `subctl` overrides it to the base branch
subm_gateway_image_tag=${BASE_BRANCH}
subm_gateway_image_repo=$(git grep DefaultRepo api/v1alpha1/versions.go | cut -f2 -d'"')

# FIXME: Actually act on this size request in controller
subm_gateway_size=3
Expand Down Expand Up @@ -229,6 +230,12 @@ function verify_subm_op_pod() {
kubectl logs $subm_operator_pod_name --namespace=$subm_ns

# TODO: Verify logs?

json_file=/tmp/${subm_operator_pod_name}.${cluster}.json
kubectl get pod $subm_operator_pod_name --namespace=$subm_ns -o json | tee $json_file

validate_pod_container_equals 'image' "localhost:5000/submariner-operator:local"
validate_pod_container_has 'command' 'submariner-operator'
}

function validate_pod_container_equals() {
Expand All @@ -255,7 +262,7 @@ function verify_subm_gateway_pod() {
json_file=/tmp/${subm_gateway_pod_name}.${cluster}.json
kubectl get pod $subm_gateway_pod_name --namespace=$subm_ns -o json | tee $json_file

validate_pod_container_equals 'image' "${subm_gateway_image_repo}/submariner-gateway:local"
validate_pod_container_equals 'image' "${subm_gateway_image_repo}/submariner-gateway:${subm_gateway_image_tag}"
validate_pod_container_has 'securityContext.capabilities.add' 'net_admin'
validate_pod_container_equals 'securityContext.allowPrivilegeEscalation' 'true'
validate_pod_container_equals 'securityContext.privileged' 'true'
Expand Down