(t *testing.T)
| 426 | } |
| 427 | |
| 428 | func TestValidateURI(t *testing.T) { |
| 429 | cases := []struct { |
| 430 | uri string |
| 431 | wantErr bool |
| 432 | }{ |
| 433 | {"https://example.com/admin", false}, |
| 434 | {"http://example.com/", false}, |
| 435 | {"", true}, |
| 436 | {"ftp://example.com", true}, |
| 437 | {"not-a-url", true}, |
| 438 | {"://missing-scheme", true}, |
| 439 | } |
| 440 | |
| 441 | for _, tc := range cases { |
| 442 | err := validateURI(tc.uri) |
| 443 | if (err != nil) != tc.wantErr { |
| 444 | t.Errorf("validateURI(%q): got err=%v, wantErr=%v", tc.uri, err, tc.wantErr) |
| 445 | } |
| 446 | } |
| 447 | } |
| 448 | |
| 449 | func TestIsCalibrationMatch(t *testing.T) { |
| 450 | setVerbose(false) |
nothing calls this directly
no test coverage detected