(t *testing.T)
| 172 | } |
| 173 | |
| 174 | func TestUpdateGroups(t *testing.T) { |
| 175 | flags := newUpdateCommand(nil).Flags() |
| 176 | flags.Set("group-add", "wheel") |
| 177 | flags.Set("group-add", "docker") |
| 178 | flags.Set("group-rm", "root") |
| 179 | flags.Set("group-add", "foo") |
| 180 | flags.Set("group-rm", "docker") |
| 181 | |
| 182 | groups := []string{"bar", "root"} |
| 183 | |
| 184 | updateGroups(flags, &groups) |
| 185 | assert.Assert(t, is.Len(groups, 3)) |
| 186 | assert.Check(t, is.Equal("bar", groups[0])) |
| 187 | assert.Check(t, is.Equal("foo", groups[1])) |
| 188 | assert.Check(t, is.Equal("wheel", groups[2])) |
| 189 | } |
| 190 | |
| 191 | func TestUpdateDNSConfig(t *testing.T) { |
| 192 | flags := newUpdateCommand(nil).Flags() |
nothing calls this directly
no test coverage detected
searching dependent graphs…