| 43 | } |
| 44 | |
| 45 | func TestIsDebug(t *testing.T) { |
| 46 | tests := []struct { |
| 47 | name string |
| 48 | envValue string |
| 49 | expected bool |
| 50 | }{ |
| 51 | { |
| 52 | name: "HELM_DEBUG is true", |
| 53 | envValue: "true", |
| 54 | expected: true, |
| 55 | }, |
| 56 | { |
| 57 | name: "HELM_DEBUG is false", |
| 58 | envValue: "false", |
| 59 | expected: false, |
| 60 | }, |
| 61 | } |
| 62 | |
| 63 | for _, tt := range tests { |
| 64 | t.Run(tt.name, func(t *testing.T) { |
| 65 | t.Setenv("HELM_DEBUG", tt.envValue) |
| 66 | require.Equalf(t, tt.expected, isDebug(), "Expected %v but got %v", tt.expected, isDebug()) |
| 67 | }) |
| 68 | } |
| 69 | } |
| 70 | |
| 71 | func TestDebugPrint(t *testing.T) { |
| 72 | tests := []struct { |