@@ -131,21 +131,27 @@ Namespace: %s`, clusterName, namespace)))
131
131
}, "120s" , "1s" ).Should (Equal (http .StatusOK ))
132
132
133
133
By ("Updating the version of the installed profile" )
134
- stdOut , stdErr = runCommandAndReturnStringOutput (fmt .Sprintf ("%s update profile --name %s --version 6.0.0 --namespace %s --cluster %s --config-repo %s --auto-merge" , gitopsBinaryPath , profileName , namespace , clusterName , appRepoRemoteURL ))
135
- Expect (stdErr ).To (BeEmpty ())
134
+ time .Sleep (4 * time .Minute )
135
+ Eventually (func () string {
136
+ stdOut , stdErr = runCommandAndReturnStringOutput (fmt .Sprintf ("%s update profile --name %s --version 6.0.0 --namespace %s --cluster %s --config-repo %s --auto-merge" , gitopsBinaryPath , profileName , namespace , clusterName , appRepoRemoteURL ))
137
+ return stdErr
138
+ }, "120s" , "5s" ).Should (BeEmpty ())
139
+
136
140
Expect (stdOut ).To (ContainSubstring (
137
- fmt .Sprintf (`Updating 1 profile:
138
-
139
- Name: podinfo
140
- Version: 6.0.0
141
- Cluster: %s
142
- Namespace: %s` , clusterName , namespace )))
141
+ fmt .Sprintf (
142
+ `Updating profile:
143
+
144
+ Name: podinfo
145
+ Version: 6.0.0
146
+ Cluster: %s
147
+ Namespace: %s` , clusterName , namespace )))
143
148
144
149
By ("Verifying that the profile installed in the cluster's namespace was updated to the correct version" )
145
- Eventually (func () int {
146
- resp , statusCode , err = kubernetesDoRequest (namespace , clusterName + "-" + profileName , "9898" , "/healthz" , clientSet )
147
- return statusCode
148
- }, "120s" , "1s" ).Should (Equal (http .StatusOK ))
150
+ Eventually (func () string {
151
+ stdOut , stdErr = runCommandAndReturnStringOutput (fmt .Sprintf ("kubectl get pods -n %s --selector=app.kubernetes.io/name=%s-%s -o jsonpath='{.items[*].spec.containers[*].image}'" , namespace , clusterName , profileName ))
152
+ Expect (stdErr ).Should (BeEmpty ())
153
+ return stdOut
154
+ }, "240s" , "5s" ).Should (ContainSubstring ("ghcr.io/stefanprodan/podinfo:6.0.0" ))
149
155
})
150
156
151
157
It ("@skipOnNightly profiles are installed into a different namespace" , func () {
0 commit comments