From 54af57c755d831977f45dc4ed88a4bd5e941422b Mon Sep 17 00:00:00 2001 From: Antoine Toussaint Date: Mon, 17 Aug 2026 19:47:15 -0400 Subject: [PATCH] test: assert restricted profile omits empty manifests (#16) Core v0.3.0's WithDeployment skips templates that render blank, so namespace.yaml and secret.yaml are no longer emitted as empty stubs under the restricted portable profile. Update the test to assert those files are absent instead of present-and-empty. Co-Authored-By: Claude Opus 4.8 --- deployment_test.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/deployment_test.go b/deployment_test.go index 807bb9e..9ff7c41 100644 --- a/deployment_test.go +++ b/deployment_test.go @@ -107,12 +107,8 @@ func TestRestrictedPortableDeployment(t *testing.T) { filepath.Join("base", "namespace.yaml"), filepath.Join("overlays", "test", "secret.yaml"), } { - content, readErr := os.ReadFile(filepath.Join(destination, relative)) - if readErr != nil { - t.Fatal(readErr) - } - if strings.TrimSpace(string(content)) != "" { - t.Fatalf("%s must be empty for restricted output:\n%s", relative, content) + if _, statErr := os.Stat(filepath.Join(destination, relative)); !os.IsNotExist(statErr) { + t.Fatalf("%s must not be rendered for restricted output", relative) } } statefulSet, err := os.ReadFile(filepath.Join(destination, "base", "stateful-set.yaml"))