(t *testing.T)
| 62 | } |
| 63 | |
| 64 | func TestCreateController_ExecuteCreate_Ports(t *testing.T) { |
| 65 | cfg, _ := setupCreateConfig(t) |
| 66 | |
| 67 | ctrl := NewCreateController(TypePorts, "2222", cfg) |
| 68 | ctrl.ExecuteCreate() |
| 69 | |
| 70 | // "2222" already exists |
| 71 | count := 0 |
| 72 | for _, p := range cfg.Main.Ports { |
| 73 | if p == "2222" { |
| 74 | count++ |
| 75 | } |
| 76 | } |
| 77 | assert.Equal(t, 1, count) |
| 78 | } |
| 79 | |
| 80 | func TestCreateController_ExecuteCreate_NewPort(t *testing.T) { |
| 81 | cfg, _ := setupCreateConfig(t) |
nothing calls this directly
no test coverage detected