(t *testing.T)
| 147 | } |
| 148 | |
| 149 | func TestUpdateEnvironmentWithDuplicateValues(t *testing.T) { |
| 150 | flags := newUpdateCommand(nil).Flags() |
| 151 | flags.Set("env-rm", "foo") |
| 152 | flags.Set("env-add", "foo=first") |
| 153 | flags.Set("env-add", "foo=second") |
| 154 | |
| 155 | envs := []string{"foo=value"} |
| 156 | |
| 157 | updateEnvironment(flags, &envs) |
| 158 | assert.Check(t, is.Len(envs, 1)) |
| 159 | assert.Equal(t, envs[0], "foo=second") |
| 160 | } |
| 161 | |
| 162 | func TestUpdateEnvironmentWithDuplicateKeys(t *testing.T) { |
| 163 | // Test case for #25404 |
nothing calls this directly
no test coverage detected
searching dependent graphs…