Repository navigation
Kubernetes Stdlib tests - #307
Conversation
There was a problem hiding this comment.
Can we add all the tests we were doing in stackbrew?
TestHelmRepoChart, TestHelmCustomChart
There was a problem hiding this comment.
We need to find a way to automatically skip those tests when kind is not available.
You can look at test::secret in test-lib.sh for an example on how we skip tests that require secrets automatically when secrets are not available.
There was a problem hiding this comment.
I made a simple condition statement to handle it.
I check if a kubeconfig exist as ~/.kube/config file and then I check if the user in the kubeconfig is kind.
If the condition is true, we are 100% sure that our kubeconfig is used to read a kind cluster.
if [ -f "/home/$USER/.kube/config" ] && grep -q "kind" "/home/$USER/.kube/config" &> /dev/null; then
# Do test
then
# Skip message
fiIs it okay ?
|
/cc @aluzzardi I found a bug in the It works well when I send a directory as But when I want to deploy a chart from repository, there is a problem. ReproduceHere is the OutputResearchI dig into The bug come from that piece of code The file I just don't understand why "redis" doesn't work because it should be consider as a I can't finish |
|
/cc @samalba
No, I think it got broken while being ported from stackbrew. Background: helm supports two kind of charts: either a directory ( There's quite a few fixes to do here:
|
There was a problem hiding this comment.
this should be moved inside TestKubeApply and randomized to avoid conflicting between test runs.
See
dagger/tests/llb/push-container/main.cue
Line 10 in 6673ae6
There was a problem hiding this comment.
(also look at the structure of that test as a reference)
There was a problem hiding this comment.
Done
But I got a cycle error in kubernetes.cue if I put the random in TestKubeApply so I put it outside to solve that problem
aluzzardi
left a comment
There was a problem hiding this comment.
Mostly good! A few last comments
…ernetes cluster Signed-off-by: Tom Chauveau <[email protected]>
Signed-off-by: Tom Chauveau <[email protected]>
tests(stdlib/kubernetes): add kubernetes basic Apply test Signed-off-by: Tom Chauveau <[email protected]>
tests(stdlib/k8s/helm): add verification style(tests/): rename helper into verify to confirm that deployments works Signed-off-by: Tom Chauveau <[email protected]>
Pulls in pitfall diagnostics (vito/dang#302) and tree-sitter compiled to WebAssembly and run by wazero (vito/dang#303, #307): Dang no longer needs cgo anywhere, and its highlighter (dang.Highlight) is usable from any binary. Signed-off-by: Alex Suraci <[email protected]>
Pulls in pitfall diagnostics (vito/dang#302), tree-sitter compiled to WebAssembly and run by wazero (vito/dang#303, #307): Dang no longer needs cgo anywhere, and its highlighter (dang.Highlight) is usable from any binary. Also checker diagnostics fixes (vito/dang#309): GraphQL object list hints suggest `value.{{id}}`, and a failed declaration no longer cascades "not found" errors through its uses. Signed-off-by: Alex Suraci <[email protected]>
Pulls in pitfall diagnostics (vito/dang#302), tree-sitter compiled to WebAssembly and run by wazero (vito/dang#303, #307): Dang no longer needs cgo anywhere, and its highlighter (dang.Highlight) is usable from any binary. Also checker diagnostics fixes (vito/dang#309): GraphQL object list hints suggest `value.{{id}}`, and a failed declaration no longer cascades "not found" errors through its uses. Signed-off-by: Alex Suraci <[email protected]>
Pulls in pitfall diagnostics (vito/dang#302), tree-sitter compiled to WebAssembly and run by wazero (vito/dang#303, #307): Dang no longer needs cgo anywhere, and its highlighter (dang.Highlight) is usable from any binary. Also checker diagnostics fixes (vito/dang#309): GraphQL object list hints suggest `value.{{id}}`, and a failed declaration no longer cascades "not found" errors through its uses. Signed-off-by: Alex Suraci <[email protected]>
Setup
In order to reach local kubernetes cluster. I've added the flag
--net=hoston buildkit container.Kubernetes Fix
I also fixed the
kuberneteslibrary, there was a problem with source inline :Tests
Helpers
I've also added a file named
verify.cueto :