TestBuildBootstrapURL_OpenModeNext — in open mode (no token) the next= query still attaches, with no fragment.
(t *testing.T)
| 352 | // TestBuildBootstrapURL_OpenModeNext — in open mode (no token) the next= |
| 353 | // query still attaches, with no fragment. |
| 354 | func TestBuildBootstrapURL_OpenModeNext(t *testing.T) { |
| 355 | cfg := newTestConfig(t, "http://example.test:7777") |
| 356 | |
| 357 | got, err := buildBootstrapURL(cfg, "open", "/auth/cli/XYZ") |
| 358 | if err != nil { |
| 359 | t.Fatalf("buildBootstrapURL: %v", err) |
| 360 | } |
| 361 | want := "http://example.test:7777/setup?next=%2Fauth%2Fcli%2FXYZ" |
| 362 | if got != want { |
| 363 | t.Errorf("buildBootstrapURL = %q, want %q", got, want) |
| 364 | } |
| 365 | } |
| 366 | |
| 367 | // TestReadBootstrapToken_TrimsTrailingNewline — EnsureBootstrapToken |
| 368 | // writes "<token>\n", so a faithful read must strip the trailing newline |
nothing calls this directly
no test coverage detected