(t *testing.T)
| 81 | } |
| 82 | |
| 83 | func TestIsSensitiveEnvKey(t *testing.T) { |
| 84 | testCases := []struct { |
| 85 | key string |
| 86 | expected bool |
| 87 | }{ |
| 88 | {"OPENAI_API_KEY", true}, |
| 89 | {"CLIENT_SECRET", true}, |
| 90 | {"CLIENT_KEY", true}, |
| 91 | {"MY_APP_TOKEN", true}, |
| 92 | {"MY_APP_TOKEN", true}, |
| 93 | {"PASSWORD_VAR", true}, |
| 94 | {"some_secret_value", true}, |
| 95 | {"USERNAME", false}, |
| 96 | {"LOG_LEVEL", false}, |
| 97 | } |
| 98 | |
| 99 | for _, tc := range testCases { |
| 100 | t.Run(tc.key, func(t *testing.T) { |
| 101 | assert.Equal(t, tc.expected, isSensitiveEnvKey(tc.key)) |
| 102 | }) |
| 103 | } |
| 104 | } |
| 105 | |
| 106 | func TestExpandPath(t *testing.T) { |
| 107 | homeDir, err := os.UserHomeDir() |
nothing calls this directly
no test coverage detected