MCPcopy
hub / github.com/roboll/helmfile / Test_LogLevels

Function Test_LogLevels

pkg/helmexec/exec_test.go:637–651  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

635}
636
637func Test_LogLevels(t *testing.T) {
638 var buffer bytes.Buffer
639 for logLevel, expected := range logLevelTests {
640 buffer.Reset()
641 logger := NewLogger(&buffer, logLevel)
642 helm := MockExecer(logger, "")
643 err := helm.AddRepo("myRepo", "https://repo.example.com/", "", "", "", "example_user", "example_password", "", "", "")
644 if err != nil {
645 t.Errorf("unexpected error: %v", err)
646 }
647 if buffer.String() != expected {
648 t.Errorf("helmexec.AddRepo()\nactual = %v\nexpect = %v", buffer.String(), expected)
649 }
650 }
651}
652
653func Test_getTillerlessEnv(t *testing.T) {
654 context := HelmContext{Tillerless: true, TillerNamespace: "foo", WorkerIndex: 1}

Callers

nothing calls this directly

Calls 3

NewLoggerFunction · 0.85
MockExecerFunction · 0.70
AddRepoMethod · 0.65

Tested by

no test coverage detected