Skip to content

Commit

Permalink
Merge pull request #4051 from LiilyZhang/zhangl/Issue3433
Browse files Browse the repository at this point in the history
Issue #3433 - (part1) MMSinCluster: add e2edev test cases
  • Loading branch information
LiilyZhang authored May 1, 2024
2 parents 1a4049b + 21b73cf commit b7fc675
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 5 deletions.
18 changes: 17 additions & 1 deletion test/docker/fs/etc/agent-in-kube/deployment.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ spec:
volumes:
- name: agent-pvc-vol
persistentVolumeClaim:
claimName: agent-pvc-horizon
claimName: openhorizon-agent-pvc
- name: agent-etc-vol
configMap:
name: agent-configmap-horizon
Expand Down Expand Up @@ -54,3 +54,19 @@ spec:
value: "5"
- name: AGENT_NAMESPACE
value: "agent-namespace"
---
apiVersion: v1
kind: Service
metadata:
name: agent-service
namespace: agent-namespace
labels:
app: agent
spec:
selector:
app: agent
ports:
- name: ess-secure-port-name
protocol: TCP
port: 8443
targetPort: 8443
18 changes: 17 additions & 1 deletion test/docker/fs/etc/agent-in-kube/deployment_nocert.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ spec:
volumes:
- name: agent-pvc-vol
persistentVolumeClaim:
claimName: agent-pvc-horizon
claimName: openhorizon-agent-pvc
- name: agent-etc-vol
configMap:
name: agent-configmap-horizon
Expand Down Expand Up @@ -49,3 +49,19 @@ spec:
value: "5"
- name: AGENT_NAMESPACE
value: "agent-namespace"
---
apiVersion: v1
kind: Service
metadata:
name: agent-service
namespace: agent-namespace
labels:
app: agent
spec:
selector:
app: agent
ports:
- name: ess-secure-port-name
protocol: TCP
port: 8443
targetPort: 8443
2 changes: 1 addition & 1 deletion test/docker/fs/etc/agent-in-kube/persistent-claim.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: agent-pvc-horizon
name: openhorizon-agent-pvc
namespace: agent-namespace
spec:
storageClassName: "microk8s-hostpath"
Expand Down
Binary file not shown.
Binary file not shown.
4 changes: 2 additions & 2 deletions test/gov/run_kube.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ DOCKER_TEST_NETWORK=$4
AGENT_NAME_SPACE="agent-namespace"
NAMESPACE_IN_POLICY="ns-in-policy"
SVC_EMBEDDED_NAMESPACE="operator-embedded-ns"
OPERATOR_DEPLOYMENT_NAME="topservice-operator"
OPERATOR_DEPLOYMENT_NAME="topserviceoperators"
CONFIGMAP_NAME="agent-configmap-horizon"
SECRET_NAME="agent-secret-cert"
PVC_NAME="agent-pvc-horizon"
PVC_NAME="openhorizon-agent-pvc"
WAIT_POD_MAX_TRY=30

USERDEV_ADMIN_AUTH="userdev/userdevadmin:userdevadminpw"
Expand Down
5 changes: 5 additions & 0 deletions test/gov/stop_kube.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
NAME_SPACE="agent-namespace"
CONFIGMAP_NAME="agent-configmap-horizon"
SECRET_NAME="agent-secret-cert"
PVC_NAME="openhorizon-agent-pvc"

isRoot=$(id -u)
cprefix="sudo -E"
Expand Down Expand Up @@ -53,6 +54,10 @@ $cprefix microk8s.kubectl delete secret ${SECRET_NAME} -n ${NAME_SPACE}
RC=$?
if [ $RC -ne 0 ]; then echo "Error deleting secret ${SECRET_NAME}: $RC"; fi

$cprefix microk8s.kubectl delete pvc ${PVC_NAME} -n ${NAME_SPACE}
RC=$?
if [ $RC -ne 0 ]; then echo "Error deleting pvc ${PVC_NAME}: $RC"; fi

$cprefix microk8s.kubectl delete namespace ${NAME_SPACE}
RC=$?
if [ $RC -ne 0 ]; then echo "Error deleting agent namespace ${NAME_SPACE}: $RC"; fi
Expand Down

0 comments on commit b7fc675

Please sign in to comment.