(t *testing.T)
| 250 | } |
| 251 | |
| 252 | func TestGetNamespaceOrDefault(t *testing.T) { |
| 253 | t.Run("namespace is empty", func(t *testing.T) { |
| 254 | ns := GetNamespaceOrDefault("default") |
| 255 | assert.Equal(t, "default", ns) |
| 256 | }) |
| 257 | |
| 258 | t.Run("namespace is not empty", func(t *testing.T) { |
| 259 | t.Setenv("NAMESPACE", "testNs") |
| 260 | ns := GetNamespaceOrDefault("default") |
| 261 | assert.Equal(t, "testNs", ns) |
| 262 | }) |
| 263 | } |
| 264 | |
| 265 | func BenchmarkFilter(b *testing.B) { |
| 266 | vals := make([]int, 100) |
nothing calls this directly
no test coverage detected