mirror of
https://github.com/holos-run/holos.git
synced 2026-03-19 16:54:58 +00:00
PROBLEM: The "Kustomize" tutorial has hardcoded code blocks and hasn't been updated to use the automated testscript workflow. SOLUTION: Create a test for the Kustomize tutorial. Create a testscript for the Kustomize test. Update the Kustomize MDX file to load in data from the testscript directory. OUTCOME: The code content in the Kustomize tutorial now comes directly from the testscript workflow.
20 lines
424 B
Go
20 lines
424 B
Go
package main
|
|
|
|
import (
|
|
"path/filepath"
|
|
"testing"
|
|
)
|
|
|
|
// Run these with go test -v to see the verbose names
|
|
func TestKustomize(t *testing.T) {
|
|
t.Run("TestKustomize", func(t *testing.T) {
|
|
// Get an ordered list of test script files.
|
|
dir := "_kustomize"
|
|
for _, file := range sortedTestScripts(t, filepath.Join(dir, "examples")) {
|
|
t.Run("examples", func(t *testing.T) {
|
|
runOneScript(t, dir, file)
|
|
})
|
|
}
|
|
})
|
|
}
|