Skip to content
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 docs/acceptance_testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ You must configure the gitlab oath application with redirect url as below. It is
`kind delete clusters --all`
- Create a new clean kind cluster.

`kind create cluster --config test/utils/data/local-kind-config.yaml`
`./test/utils/scripts/mgmt-cluster-setup.sh kind $(pwd) mgmt-kind`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍


- ***Automatic installation:*** Test frame work automatically installs the core and enterprise controllers and setup the management cluster along with required repository, resources, secrets and entitlements etc. Any subsequent test runs will skip the management cluster setup and starts the test execution straight away. You need to recreate the kind cluster in case you want to install new enterprise version/release for testing.

Expand Down
2 changes: 1 addition & 1 deletion test/acceptance/test/utils_gitops.go
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ func runGitopsCommand(cmd string, timeout ...time.Duration) (stdOut, stdErr stri
case OidcUserLogin:
authFlag = fmt.Sprintf("--kubeconfig=%s", userCredentials.UserKubeconfig)
default:
gomega.Expect(fmt.Errorf("error: Provided authento=ication type '%s' is not supported for CLI", userCredentials.UserType))
gomega.Expect(fmt.Errorf("error: Provided authentication type '%s' is not supported for CLI", userCredentials.UserType))
}
}

Expand Down
2 changes: 1 addition & 1 deletion test/utils/data/gitops-cluster-bootstrap-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ spec:
# requiredClusterReady: true
spec:
containers:
- image: ghcr.io/fluxcd/flux-cli:v0.35.0
- image: ghcr.io/fluxcd/flux-cli:v0.36.0
imagePullPolicy: Always
name: flux-bootstrap
resources: {}
Expand Down
24 changes: 18 additions & 6 deletions test/utils/scripts/wego-enterprise.sh
Original file line number Diff line number Diff line change
Expand Up @@ -186,12 +186,24 @@ function setup {
kubectl wait --for=condition=Ready --timeout=300s -n flux-system --all pod
Copy link
Collaborator

@foot foot Nov 14, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other thing that comes to mind is to helm install --wait above which will wait for pods / services to be available,

--wait if set, will wait until all Pods, PVCs, Services, and minimum number of Pods of a Deployment, StatefulSet, or ReplicaSet are in a ready state before marking the release as successful. It will wait for as long as --timeout

https://helm.sh/docs/helm/helm_install/

Which I would assume would be in the main chart at least, maybe the subcharts too (like policy-agent), not sure exactly.


# Install ingress-nginx for tls termination
helm upgrade --install ingress-nginx ingress-nginx/ingress-nginx \
--namespace ingress-nginx --create-namespace \
--version 4.0.18 \
--set controller.service.type=NodePort \
--set controller.service.nodePorts.https=${UI_NODEPORT} \
--set controller.extraArgs.v=4
command="helm upgrade --install ingress-nginx ingress-nginx/ingress-nginx \
--namespace ingress-nginx --create-namespace \
--version 4.4.0 \
--set controller.service.type=NodePort \
--set controller.service.nodePorts.https=30080 \
--set controller.extraArgs.v=4"
# When policy-agent ValidatingWebhook service has not fully started up, admission controller call to matching validating webhook fails.
# Retrying few times gives enough time for ValidatingWebhook service to become available
for i in {0..5}
do
echo "Attempt installing ingress-nginx: $(($i+1))"
eval $command
if [ $? -ne 0 ]; then
sleep 3
else
break
fi
done
kubectl wait --for=condition=Ready --timeout=120s -n ingress-nginx --all pod

cat ${args[1]}/test/utils/data/certificate-issuer.yaml | \
Expand Down