Add test on AWS eks
Signed-off-by: Tom Chauveau <tom.chauveau@epitech.eu>
This commit is contained in:
parent
2d72303bc4
commit
9fc247848f
@ -1,7 +1,6 @@
|
|||||||
package eks
|
package eks
|
||||||
|
|
||||||
import (
|
import (
|
||||||
// "dagger.io/dagger"
|
|
||||||
"dagger.io/dagger/op"
|
"dagger.io/dagger/op"
|
||||||
"dagger.io/aws"
|
"dagger.io/aws"
|
||||||
)
|
)
|
||||||
@ -19,7 +18,8 @@ import (
|
|||||||
|
|
||||||
// kubeconfig is the generated kube configuration file
|
// kubeconfig is the generated kube configuration file
|
||||||
kubeconfig: {
|
kubeconfig: {
|
||||||
string// FIXME There is a problem with dagger.#Artifact type
|
// FIXME There is a problem with dagger.#Secret type
|
||||||
|
string
|
||||||
|
|
||||||
#up: [
|
#up: [
|
||||||
op.#Load & {
|
op.#Load & {
|
||||||
|
@ -43,3 +43,8 @@ setup() {
|
|||||||
|
|
||||||
"$DAGGER" compute "$TESTDIR"/stdlib/aws/s3 --input-dir TestDirectory="$TESTDIR"/stdlib/aws/s3/testdata --input-yaml "$TESTDIR"/stdlib/aws/inputs.yaml
|
"$DAGGER" compute "$TESTDIR"/stdlib/aws/s3 --input-dir TestDirectory="$TESTDIR"/stdlib/aws/s3/testdata --input-yaml "$TESTDIR"/stdlib/aws/inputs.yaml
|
||||||
}
|
}
|
||||||
|
@test "stdlib: aws" {
|
||||||
|
skip_unless_secrets_available "$TESTDIR"/stdlib/aws/inputs.yaml
|
||||||
|
|
||||||
|
"$DAGGER" compute "$TESTDIR"/stdlib/aws/eks --input-yaml "$TESTDIR"/stdlib/aws/inputs.yaml
|
||||||
|
}
|
53
tests/stdlib/aws/eks/eks.cue
Normal file
53
tests/stdlib/aws/eks/eks.cue
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
package eks
|
||||||
|
|
||||||
|
import (
|
||||||
|
"dagger.io/aws"
|
||||||
|
"dagger.io/aws/eks"
|
||||||
|
"dagger.io/kubernetes"
|
||||||
|
"dagger.io/dagger/op"
|
||||||
|
)
|
||||||
|
|
||||||
|
TestConfig: awsConfig: aws.#Config & {
|
||||||
|
region: "us-east-2"
|
||||||
|
}
|
||||||
|
|
||||||
|
TestCluster: eks.#KubeConfig & {
|
||||||
|
config: TestConfig.awsConfig
|
||||||
|
clusterName: *"dagger-example-eks-cluster" | string
|
||||||
|
}
|
||||||
|
|
||||||
|
TestEks: {
|
||||||
|
#GetPods:
|
||||||
|
"""
|
||||||
|
kubectl get pods -A
|
||||||
|
"""
|
||||||
|
|
||||||
|
#up: [
|
||||||
|
op.#Load & {
|
||||||
|
from: kubernetes.#Kubectl
|
||||||
|
},
|
||||||
|
|
||||||
|
op.#WriteFile & {
|
||||||
|
dest: "/kubeconfig"
|
||||||
|
content: TestCluster.kubeconfig
|
||||||
|
},
|
||||||
|
|
||||||
|
op.#WriteFile & {
|
||||||
|
dest: "/getPods.sh"
|
||||||
|
content: #GetPods
|
||||||
|
},
|
||||||
|
|
||||||
|
op.#Exec & {
|
||||||
|
always: true
|
||||||
|
args: [
|
||||||
|
"/bin/bash",
|
||||||
|
"--noprofile",
|
||||||
|
"--norc",
|
||||||
|
"-eo",
|
||||||
|
"pipefail",
|
||||||
|
"/getPods.sh",
|
||||||
|
]
|
||||||
|
env: KUBECONFIG: "/kubeconfig"
|
||||||
|
},
|
||||||
|
]
|
||||||
|
}
|
Reference in New Issue
Block a user