MCPcopy
hub / github.com/tailscale/tailscale / TestToolchainMatches

Function TestToolchainMatches

version_tailscale_test.go:14–27  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

12)
13
14func TestToolchainMatches(t *testing.T) {
15 tsRev, ok := tailscaleToolchainRev()
16 if !ok {
17 t.Fatal("failed to read build info")
18 }
19 want := strings.TrimSpace(GoToolchainRev)
20 if tsRev != want {
21 if os.Getenv("TS_PERMIT_TOOLCHAIN_MISMATCH") == "1" {
22 t.Logf("tailscale.toolchain.rev = %q, want %q; but ignoring due to TS_PERMIT_TOOLCHAIN_MISMATCH=1", tsRev, want)
23 return
24 }
25 t.Errorf("tailscale.toolchain.rev = %q, want %q; permit with TS_PERMIT_TOOLCHAIN_MISMATCH=1", tsRev, want)
26 }
27}

Callers

nothing calls this directly

Calls 4

tailscaleToolchainRevFunction · 0.85
FatalMethod · 0.65
LogfMethod · 0.65
ErrorfMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…