(t *testing.T, ep Endpoint, entity *intel.Entity, expectedResult EPResult)
| 126 | } |
| 127 | |
| 128 | func testEndpointMatch(t *testing.T, ep Endpoint, entity *intel.Entity, expectedResult EPResult) { |
| 129 | t.Helper() |
| 130 | |
| 131 | result, _ := ep.Matches(context.TODO(), entity) |
| 132 | if result != expectedResult { |
| 133 | t.Errorf( |
| 134 | "line %d: unexpected result for endpoint %s and entity %+v: result=%s, expected=%s", |
| 135 | getLineNumberOfCaller(1), |
| 136 | ep, |
| 137 | entity, |
| 138 | result, |
| 139 | expectedResult, |
| 140 | ) |
| 141 | } |
| 142 | } |
| 143 | |
| 144 | func testFormat(t *testing.T, endpoint string, shouldSucceed bool) { |
| 145 | t.Helper() |
no test coverage detected