This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
dagger/docs/learn/tests/kube-aws/cue-manifest/test/test.cue
Tom Chauveau f24af776db Add test for kube-aws cue-manifest part
Signed-off-by: Tom Chauveau <tom.chauveau@epitech.eu>
2021-09-01 11:17:05 +02:00

67 lines
1008 B
CUE

package main
import (
"alpha.dagger.io/dagger/op"
"alpha.dagger.io/kubernetes"
)
TestEks: {
#_GetDeployment: """
kubectl describe deployment todoapp | grep 'True'
"""
#_DeleteDeployment: """
kubectl delete deployment todoapp
kubectl delete service todoapp-service
"""
#up: [
op.#Load & {
from: kubernetes.#Kubectl
},
op.#WriteFile & {
dest: "/kubeconfig"
content: todoApp.kubeSrc.kubeconfig
},
op.#WriteFile & {
dest: "/getPods.sh"
content: #_GetDeployment
},
op.#WriteFile & {
dest: "/deletePods.sh"
content: #_DeleteDeployment
},
// Get pods
op.#Exec & {
always: true
args: [
"/bin/bash",
"--noprofile",
"--norc",
"-eo",
"pipefail",
"/getPods.sh",
]
env: KUBECONFIG: "/kubeconfig"
},
// Delete pods
op.#Exec & {
always: true
args: [
"/bin/bash",
"--noprofile",
"--norc",
"-eo",
"pipefail",
"/deletePods.sh",
]
env: KUBECONFIG: "/kubeconfig"
},
]
}