(t *testing.T)
| 9 | ) |
| 10 | |
| 11 | func TestAddProxyToCollection(t *testing.T) { |
| 12 | collection := toxiproxy.NewProxyCollection() |
| 13 | proxy := NewTestProxy("test", "localhost:20000") |
| 14 | |
| 15 | if _, err := collection.Get(proxy.Name); err == nil { |
| 16 | t.Error("Expected proxies to be empty") |
| 17 | } |
| 18 | |
| 19 | err := collection.Add(proxy, false) |
| 20 | if err != nil { |
| 21 | t.Error("Expected to be able to add first proxy to collection") |
| 22 | } |
| 23 | |
| 24 | if _, err := collection.Get(proxy.Name); err != nil { |
| 25 | t.Error("Expected proxy to be added to map") |
| 26 | } |
| 27 | } |
| 28 | |
| 29 | func TestAddTwoProxiesToCollection(t *testing.T) { |
| 30 | collection := toxiproxy.NewProxyCollection() |
nothing calls this directly
no test coverage detected
searching dependent graphs…