MCPcopy Create free account
hub / github.com/PerpetualSoftware/pad / TestBuildBootstrapURL_OpenModeNext

Function TestBuildBootstrapURL_OpenModeNext

internal/cli/bootstrap_test.go:354–365  ·  view source on GitHub ↗

TestBuildBootstrapURL_OpenModeNext — in open mode (no token) the next= query still attaches, with no fragment.

(t *testing.T)

Source from the content-addressed store, hash-verified

352// TestBuildBootstrapURL_OpenModeNext — in open mode (no token) the next=
353// query still attaches, with no fragment.
354func 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

Callers

nothing calls this directly

Calls 2

buildBootstrapURLFunction · 0.85
newTestConfigFunction · 0.70

Tested by

no test coverage detected