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

Function writeBootstrapToken

internal/cli/bootstrap_test.go:52–58  ·  view source on GitHub ↗

writeBootstrapToken drops a token file at /.bootstrap-token in the same shape EnsureBootstrapToken would produce — token + trailing newline, mode 0600 — so ReadBootstrapToken sees what it expects.

(t *testing.T, dataDir, token string)

Source from the content-addressed store, hash-verified

50// the same shape EnsureBootstrapToken would produce — token + trailing
51// newline, mode 0600 — so ReadBootstrapToken sees what it expects.
52func writeBootstrapToken(t *testing.T, dataDir, token string) {
53 t.Helper()
54 path := filepath.Join(dataDir, bootstrapTokenFilename)
55 if err := os.WriteFile(path, []byte(token+"\n"), 0600); err != nil {
56 t.Fatalf("write bootstrap token: %v", err)
57 }
58}
59
60// TestRunBrowserBootstrap_Idempotent confirms the helper is a no-op when
61// the server already reports setup_required: false — important for

Calls 1

JoinMethod · 0.80

Tested by

no test coverage detected