MCPcopy Index your code
hub / github.com/databus23/helm-diff / TestLocalCmdExecution

Function TestLocalCmdExecution

cmd/local_test.go:49–71  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

47}
48
49func TestLocalCmdExecution(t *testing.T) {
50 manifestYAML := `---
51apiVersion: v1
52kind: ConfigMap
53metadata:
54 name: test-config
55 namespace: default
56data:
57 key: value
58`
59 setupFakeHelm(t, "default", manifestYAML, "", "")
60
61 chart1 := t.TempDir()
62 chart2 := t.TempDir()
63
64 cmd := localCmd()
65 cmd.SetArgs([]string{chart1, chart2})
66
67 err := cmd.Execute()
68 if err != nil {
69 t.Errorf("Expected no error but got: %v", err)
70 }
71}
72
73func TestLocalCmdNoChanges(t *testing.T) {
74 manifestYAML := `---

Callers

nothing calls this directly

Calls 2

setupFakeHelmFunction · 0.85
localCmdFunction · 0.85

Tested by

no test coverage detected