MCPcopy Create free account
hub / github.com/openclaw/gogcli / writeKeepSA

Function writeKeepSA

internal/cmd/keep_test.go:19–30  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

17)
18
19func writeKeepSA(t *testing.T) string {
20 t.Helper()
21
22 saPath := defaultLayoutForTest(t, config.PathKindData).KeepServiceAccountPath("a@b.com")
23 if mkdirErr := os.MkdirAll(filepath.Dir(saPath), 0o700); mkdirErr != nil {
24 t.Fatalf("mkdir: %v", mkdirErr)
25 }
26 if writeErr := os.WriteFile(saPath, []byte("{}"), 0o600); writeErr != nil {
27 t.Fatalf("write: %v", writeErr)
28 }
29 return saPath
30}
31
32func TestGetKeepService_NoServiceAccountConfigured(t *testing.T) {
33 home := t.TempDir()

Callers 15

TestKeepList_PlainFunction · 0.85
TestKeepList_NoNotesFunction · 0.85
TestKeepList_JSONFunction · 0.85
TestKeepGet_PlainFunction · 0.85
TestKeepGet_JSONFunction · 0.85
TestKeepSearch_PagingFunction · 0.85
TestKeepSearch_NoMatchFunction · 0.85
TestKeepCreate_TextPlainFunction · 0.85

Calls 3

defaultLayoutForTestFunction · 0.85
DirMethod · 0.45

Tested by

no test coverage detected