Add basic test for kubernetes kind documentation

Signed-off-by: Tom Chauveau <tom.chauveau@epitech.eu>
This commit is contained in:
Tom Chauveau 2021-08-13 16:35:53 +02:00 committed by Guillaume de Rouville
parent 6a442fae6c
commit a8e218d808
6 changed files with 185 additions and 113 deletions

3
.gitignore vendored
View File

@ -12,7 +12,7 @@
# Test binary, build with `go test -c` # Test binary, build with `go test -c`
*.test *.test
tests/report.xml **/*/report.xml
# Output of the go coverage tool, specifically when used with LiteIDE # Output of the go coverage tool, specifically when used with LiteIDE
*.out *.out
@ -26,3 +26,4 @@ tests/report.xml
# node_modules # node_modules
tests/node_modules tests/node_modules
dist/ dist/
docs/learn/tests/node_modules

View File

@ -0,0 +1,2 @@
# dagger state
state/**

View File

@ -0,0 +1,23 @@
plan:
package: ./kube-kind/basic
name: kube-kind-basic
sops:
kms: []
gcp_kms: []
azure_kv: []
hc_vault: []
age:
- recipient: age1gxwmtwahzwdmrskhf90ppwlnze30lgpm056kuesrxzeuyclrwvpsupwtpk
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSAwZ3FnR0NRay9TM1FaZXhT
T2hvQ1ZDRkNLMHpMMnh6a3QrZUpRcHhkQVVBCm5NWXdRZXVPVWhEQXdwSnQwQkZ3
NE1wL3VyNjlVbmdqM2t2MDc1ZHVNd2sKLS0tIEZNUUtnUFVBOTEyMGVWbXgycHo4
Z0RqSGxzN3pyc1RLcGN5b29GbHpkbWsKhNI37Ws2sWSW2ZKZSSFH5a2LD9meOQrH
MM2Xd0+Kh4OwYIfMXmCU1CmNRP/W1MUf6Eq/21uM3fDU8GDbpOV/pA==
-----END AGE ENCRYPTED FILE-----
lastmodified: "2021-08-13T12:56:16Z"
mac: ENC[AES256_GCM,data:ODBv7782ofOQzVtETFu9wdMdmK/22jl1CqPzTqdOu6oZFWklbQ4grJ3N1cemE2Ud1Awb/x41QgpSuvVHaO2dHkVEF1FmlVDIqhqm6BNQlDg81RFuvs86FP60cW8rfr4K2dhCnQ1mRKGdTLsNUjUqBd3uwPDu5f49o3Ai/EpOg0A=,iv:1UdjtEKhKyFEnkjUOPAYlyIp8xYieDBIXKGxmxcYUbs=,tag:e6YcVmSVdsfLLMOPQXrN8A==,type:str]
pgp: []
encrypted_suffix: secret
version: 3.7.1

View File

@ -76,6 +76,26 @@ setup() {
assert_success assert_success
} }
@test "doc-1007-kube-kind" {
skip_unless_local_kube
#################### BASIC ####################
# Copy deployment to sendbox
copy_to_sandbox kube-kind-basic kube-kind
# Add kubeconfig
dagger -w "$DAGGER_SANDBOX" -e kube-kind-basic input text kubeconfig -f "$HOME"/.kube/config
# Up deployment
dagger -w "$DAGGER_SANDBOX" -e kube-kind-basic up
# Check deployment
kubectl get deployment
# Clean
kubectl delete deployments --all
}
@test "doc-1008-aws-cloudformation" { @test "doc-1008-aws-cloudformation" {
setup_example_sandbox "doc" setup_example_sandbox "doc"

View File

@ -0,0 +1,11 @@
package main
import (
"alpha.dagger.io/git"
)
manifest: git.#Repository & {
remote: "https://github.com/dagger/examples.git"
ref: "main"
subdir: "todoapp/k8s"
}

View File

@ -0,0 +1,15 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
"bats-assert@https://github.com/bats-core/bats-assert":
version "2.0.0"
resolved "https://github.com/bats-core/bats-assert#e0de84e9c011223e7f88b7ccf1c929f4327097ba"
"bats-support@https://github.com/bats-core/bats-support":
version "0.3.0"
resolved "https://github.com/bats-core/bats-support#d140a65044b2d6810381935ae7f0c94c7023c8c3"
"bats@https://github.com/bats-core/bats-core#master":
version "1.4.1"
resolved "https://github.com/bats-core/bats-core#7ff2f3efc738976feaccfdf374164b61599f9e36"