MCPcopy Create free account
hub / github.com/Driver-C/tryssh / TestCreateController_ExecuteCreate_Ports

Function TestCreateController_ExecuteCreate_Ports

pkg/control/create_test.go:64–78  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

62}
63
64func 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
80func TestCreateController_ExecuteCreate_NewPort(t *testing.T) {
81 cfg, _ := setupCreateConfig(t)

Callers

nothing calls this directly

Calls 3

ExecuteCreateMethod · 0.95
setupCreateConfigFunction · 0.85
NewCreateControllerFunction · 0.85

Tested by

no test coverage detected