Skip to content

Commit

Permalink
fix lint issues
Browse files Browse the repository at this point in the history
Signed-off-by: Ishita Sequeira <[email protected]>
  • Loading branch information
ishitasequeira committed Oct 24, 2024
1 parent 9f4502f commit add11a3
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 46 deletions.
30 changes: 15 additions & 15 deletions tests/k8s/1-032_validate_dynamic_scaling/01-assert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@ apiVersion: kuttl.dev/v1beta1
kind: TestAssert
timeout: 720
commands:
- script: |
stsReplicas=$(kubectl get sts argocd-application-controller -n $NAMESPACE -o jsonpath='{.status.replicas}')
echo "$stsReplicas"
if test "$stsReplicas" != "1"; then
echo "FAILED! Number of replicas not equal to desired replicas"
exit 1
fi
replicaEnvVariable=$(kubectl exec -it -n $NAMESPACE argocd-application-controller-0 -- printenv | grep -i ARGOCD_CONTROLLER_REPLICAS)
echo "$replicaEnvVariable"
if test "$replicaEnvVariable" != "ARGOCD_CONTROLLER_REPLICAS=1"; then
echo "FAILED! ARGOCD_CONTROLLER_REPLICAS not equal to desired replicas"
exit 1
fi
exit 0
- script: |
stsReplicas=$(kubectl get sts argocd-application-controller -n $NAMESPACE -o jsonpath='{.status.replicas}')
echo "$stsReplicas"
if test "$stsReplicas" != "1"; then
echo "FAILED! Number of replicas not equal to desired replicas"
exit 1
fi
replicaEnvVariable=$(kubectl exec -it -n $NAMESPACE argocd-application-controller-0 -- printenv | grep -i ARGOCD_CONTROLLER_REPLICAS)
echo "$replicaEnvVariable"
if test "$replicaEnvVariable" != "ARGOCD_CONTROLLER_REPLICAS=1"; then
echo "FAILED! ARGOCD_CONTROLLER_REPLICAS not equal to desired replicas"
exit 1
fi
exit 0
2 changes: 1 addition & 1 deletion tests/k8s/1-032_validate_dynamic_scaling/01-install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ spec:
apiVersion: kuttl.dev/v1beta1
kind: TestStep
commands:
- command: sleep 60s
- command: sleep 60s
29 changes: 14 additions & 15 deletions tests/k8s/1-032_validate_dynamic_scaling/02-assert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,18 @@ apiVersion: kuttl.dev/v1beta1
kind: TestAssert
timeout: 720
commands:
- script: |
stsReplicas=$(kubectl get sts argocd-application-controller -n $NAMESPACE -o jsonpath='{.status.replicas}')
echo "$stsReplicas"
if test "$stsReplicas" != "3"; then
echo "FAILED! Number of replicas not equal to desired replicas"
exit 1
fi
replicaEnvVariable=$(kubectl exec -it -n $NAMESPACE argocd-application-controller-0 -- printenv | grep -i ARGOCD_CONTROLLER_REPLICAS)
echo "$replicaEnvVariable"
if test "$replicaEnvVariable" != "ARGOCD_CONTROLLER_REPLICAS=3"; then
echo "FAILED! ARGOCD_CONTROLLER_REPLICAS not equal to desired replicas"
exit 1
fi
exit 0
- script: |
stsReplicas=$(kubectl get sts argocd-application-controller -n $NAMESPACE -o jsonpath='{.status.replicas}')
echo "$stsReplicas"
if test "$stsReplicas" != "3"; then
echo "FAILED! Number of replicas not equal to desired replicas"
exit 1
fi
replicaEnvVariable=$(kubectl exec -it -n $NAMESPACE argocd-application-controller-0 -- printenv | grep -i ARGOCD_CONTROLLER_REPLICAS)
echo "$replicaEnvVariable"
if test "$replicaEnvVariable" != "ARGOCD_CONTROLLER_REPLICAS=3"; then
echo "FAILED! ARGOCD_CONTROLLER_REPLICAS not equal to desired replicas"
exit 1
fi
exit 0
30 changes: 15 additions & 15 deletions tests/k8s/1-032_validate_dynamic_scaling/03-assert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,18 @@ apiVersion: kuttl.dev/v1beta1
kind: TestAssert
timeout: 720
commands:
- script: |
stsReplicas=$(kubectl get sts argocd-application-controller -n $NAMESPACE -o jsonpath='{.status.replicas}')
echo "$stsReplicas"
if test "$stsReplicas" != "4"; then
echo "FAILED! Number of replicas not equal to maxShards"
exit 1
fi
replicaEnvVariable=$(kubectl exec -it -n $NAMESPACE argocd-application-controller-0 -- printenv | grep -i ARGOCD_CONTROLLER_REPLICAS)
echo "$replicaEnvVariable"
if test "$replicaEnvVariable" != "ARGOCD_CONTROLLER_REPLICAS=4"; then
echo "FAILED! ARGOCD_CONTROLLER_REPLICAS not equal to maxShards"
exit 1
fi
exit 0
- script: |
stsReplicas=$(kubectl get sts argocd-application-controller -n $NAMESPACE -o jsonpath='{.status.replicas}')
echo "$stsReplicas"
if test "$stsReplicas" != "4"; then
echo "FAILED! Number of replicas not equal to maxShards"
exit 1
fi
replicaEnvVariable=$(kubectl exec -it -n $NAMESPACE argocd-application-controller-0 -- printenv | grep -i ARGOCD_CONTROLLER_REPLICAS)
echo "$replicaEnvVariable"
if test "$replicaEnvVariable" != "ARGOCD_CONTROLLER_REPLICAS=4"; then
echo "FAILED! ARGOCD_CONTROLLER_REPLICAS not equal to maxShards"
exit 1
fi
exit 0

0 comments on commit add11a3

Please sign in to comment.