tests(stdlib): add kubernetes in testing suite
tests(stdlib/kubernetes): add kubernetes basic Apply test Signed-off-by: Tom Chauveau <tom.chauveau@epitech.eu>
This commit is contained in:
40
tests/stdlib/kubernetes/helm/helm.cue
Normal file
40
tests/stdlib/kubernetes/helm/helm.cue
Normal file
@@ -0,0 +1,40 @@
|
||||
package helm
|
||||
|
||||
import (
|
||||
"dagger.io/kubernetes/helm"
|
||||
"dagger.io/dagger"
|
||||
"dagger.io/file"
|
||||
)
|
||||
|
||||
// We assume that a kinD cluster is running locally
|
||||
// To deploy a local KinD cluster, follow this link : https://kind.sigs.k8s.io/docs/user/quick-start/
|
||||
kubeconfig: dagger.#Artifact
|
||||
|
||||
// Retrive kubeconfig
|
||||
config: file.#Read & {
|
||||
filename: "config"
|
||||
from: kubeconfig
|
||||
}
|
||||
|
||||
// Dagger test k8s namespace
|
||||
namespace: "dagger-test"
|
||||
|
||||
chartName: "test-helm"
|
||||
|
||||
// Example of a `helm install` using a local chart
|
||||
// Fill using:
|
||||
// --input-dir helmChart.chart=./testdata/mychart
|
||||
TestHelmSimpleChart: {
|
||||
helm.#Chart & {
|
||||
name: chartName
|
||||
"namespace": namespace
|
||||
kubeconfig: config.contents
|
||||
chart: dagger.#Artifact
|
||||
}
|
||||
|
||||
verify: #VerifyHelm & {
|
||||
"chartName": chartName
|
||||
}
|
||||
}
|
||||
|
||||
result: helmApply: TestHelmSimpleChart.verify
|
Reference in New Issue
Block a user