-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PR to add e2e tests of linked bundle and profile update (#305)
* e2e linked updates * code formatting * Added comments for better understanding Co-authored-by: Jayanth Reddy <jaya@platform9.com>
- Loading branch information
1 parent
f34e92e
commit a508bd2
Showing
18 changed files
with
130 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
apiVersion: kuttl.dev/v1beta1 | ||
kind: TestAssert | ||
timeout: 60 | ||
--- | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
namespace: arlon | ||
name: guestbook |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
apiVersion: kuttl.dev/v1beta1 | ||
kind: TestStep | ||
commands: | ||
- command: arlon bundle create guestbook --tags test,guestbook --desc "Guestbook pod" --repo-path bundles/guestbook |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
apiVersion: core.arlon.io/v1 | ||
kind: Profile | ||
metadata: | ||
namespace: arlon | ||
name: dynamic-2 | ||
spec: | ||
bundles: | ||
- guestbook |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
apiVersion: kuttl.dev/v1beta1 | ||
kind: TestStep | ||
commands: | ||
- command: arlon profile create dynamic-2 --repo-base-path profiles --bundles guestbook --desc "dynamic test 2" --tags examples |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
apiVersion: kuttl.dev/v1beta1 | ||
kind: TestStep | ||
commands: | ||
- script: ../../e2e_linked_prereq.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
apiVersion: kuttl.dev/v1beta1 | ||
kind: TestAssert | ||
timeout: 600 | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: guestbook-ui | ||
namespace: default | ||
spec: | ||
progressDeadlineSeconds: 600 | ||
replicas: 3 | ||
revisionHistoryLimit: 3 | ||
selector: | ||
matchLabels: | ||
app: guestbook-ui | ||
template: | ||
metadata: | ||
labels: | ||
app: guestbook-ui | ||
status: | ||
availableReplicas: 3 | ||
readyReplicas: 3 | ||
replicas: 3 | ||
updatedReplicas: 3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
apiVersion: kuttl.dev/v1beta1 | ||
kind: TestStep | ||
commands: | ||
- script: ../../e2e_linked_update.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
apiVersion: kuttl.dev/v1beta1 | ||
kind: TestAssert | ||
timeout: 600 | ||
--- | ||
apiVersion: argoproj.io/v1alpha1 | ||
kind: Application | ||
metadata: | ||
name: ec2-cluster-xenial | ||
namespace: argocd | ||
status: | ||
health: | ||
status: Healthy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
apiVersion: kuttl.dev/v1beta1 | ||
kind: TestStep | ||
commands: | ||
- command: arlon profile update dynamic-2 --bundles xenial |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
arlon cluster ngupdate ec2-cluster --profile dynamic-2 | ||
clusterctl get kubeconfig ec2-cluster-capi-quickstart -n ec2-cluster > arlon-eks.kubeconfig #Generated the kubeconfig for ec2-cluster | ||
cp arlon-eks.kubeconfig /home/runner/work/arlon/arlon/kubeconfig #placing the ec2-cluster config file in $KUBECONFIG | ||
cp ~/.kube/config ~/.kube/temp.config #Swapping the ec2-cluster config with ~/.kube/config for assert.yaml | ||
cp arlon-eks.kubeconfig ~/.kube/config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
if [ -z "${GIT_USER}" ]; then | ||
echo "Set the GIT_USER env variable" | ||
exit | ||
fi | ||
|
||
if [ -z "${GIT_PASSWORD}" ]; then | ||
echo "Set the GIT_PASSWORD env variable" | ||
exit | ||
fi | ||
dir=$(pwd) | ||
export git_server_port=8188 | ||
export GIT_CLONE_ROOT=/tmp/arlon-testbed-git-clone | ||
export workspace_repo_url="http://localhost:${git_server_port}/${GIT_USER}/myrepo.git" | ||
export workspace_repo="${GIT_CLONE_ROOT}/myrepo" | ||
#updating guestbook bundle replicas to 3 from 1 | ||
cd ${workspace_repo} | ||
git pull | ||
cd bundles/guestbook | ||
sed -i -e "7s/replicas: 1/replicas: 3/g" guestbook.yaml | ||
git add guestbook.yaml | ||
git commit -m "added 3 replica line" | ||
git push "http://${GIT_USER}:${GIT_PASSWORD}@localhost:${git_server_port}/${GIT_USER}/myrepo.git" | ||
cd ${dir} | ||
|
||
cp ~/.kube/temp.config ~/.kube/config #Placing back the ~/.kube/config back in it's place | ||
rm -rf /home/runner/work/arlon/arlon/kubeconfig #Removing ec2-cluster config at $KUBECONFIG | ||
|
||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters