(t *testing.T)
| 45 | } |
| 46 | |
| 47 | func TestGetController_ExecuteGet_Users_Specific(t *testing.T) { |
| 48 | cfg := newTestMainConfig() |
| 49 | ctrl := NewGetController(TypeUsers, "root", cfg) |
| 50 | |
| 51 | output := captureOutput(func() { |
| 52 | ctrl.ExecuteGet() |
| 53 | }) |
| 54 | |
| 55 | assert.Contains(t, output, "root") |
| 56 | // "admin" should not appear as a data line (it may appear in header) |
| 57 | lines := strings.Split(output, "\n") |
| 58 | dataLines := []string{} |
| 59 | for _, line := range lines { |
| 60 | if strings.Contains(line, "admin") && !strings.Contains(line, "INDEX") { |
| 61 | dataLines = append(dataLines, line) |
| 62 | } |
| 63 | } |
| 64 | assert.Empty(t, dataLines, "admin should not appear in search results for 'root'") |
| 65 | } |
| 66 | |
| 67 | func TestGetController_ExecuteGet_Ports_All(t *testing.T) { |
| 68 | cfg := newTestMainConfig() |
nothing calls this directly
no test coverage detected