Update kubernetes testing policy to test deployment from url

Signed-off-by: Tom Chauveau <tom.chauveau@epitech.eu>
This commit is contained in:
Tom Chauveau
2021-09-06 15:20:19 +02:00
parent 97cd00332a
commit c05f7d50d4
2 changed files with 31 additions and 8 deletions

View File

@@ -29,7 +29,7 @@ TestKubeApply: {
}
// Apply deployment
apply: #Resources & {
resources: #Resources & {
kubeconfig: TestKubeconfig
namespace: "dagger-test"
manifest: yaml.Marshal(kubeSrc)
@@ -38,6 +38,24 @@ TestKubeApply: {
// Verify deployment
verify: #VerifyApply & {
podname: kubeSrc.metadata.name
namespace: apply.namespace
namespace: resources.namespace
}
}
TestLinkApply: {
// Podname from hello-world-pod
_podname: "hello-world"
// Apply deployment
resources: #Resources & {
kubeconfig: TestKubeconfig
namespace: "dagger-test"
url: "https://raw.githubusercontent.com/mstrzele/intro-to-k8s/master/hello-world-pod.yaml"
}
// Verify deployment
verify: #VerifyApply & {
podname: _podname
namespace: resources.namespace
}
}