MCPcopy Create free account
hub / github.com/coder/coder / nopAuditorPtr

Function nopAuditorPtr

coderd/database/dbpurge/dbpurge_test.go:1917–1923  ·  view source on GitHub ↗

nopAuditorPtr returns an atomic pointer to a nop auditor for tests.

(t *testing.T)

Source from the content-addressed store, hash-verified

1915
1916// nopAuditorPtr returns an atomic pointer to a nop auditor for tests.
1917func nopAuditorPtr(t *testing.T) *atomic.Pointer[audit.Auditor] {
1918 t.Helper()
1919 nop := audit.NewNop()
1920 var p atomic.Pointer[audit.Auditor]
1921 p.Store(&nop)
1922 return &p
1923}
1924
1925// mockAuditorPtr wraps a *MockAuditor in an atomic pointer for tests.
1926func mockAuditorPtr(m *audit.MockAuditor) *atomic.Pointer[audit.Auditor] {

Calls 3

NewNopFunction · 0.92
HelperMethod · 0.65
StoreMethod · 0.45

Tested by

no test coverage detected