MCPcopy
hub / github.com/larksuite/cli / TestStoreSaveReturnsMkdirError

Function TestStoreSaveReturnsMkdirError

shortcuts/apps/gitcred/gitcred_test.go:1342–1351  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

1340}
1341
1342func TestStoreSaveReturnsMkdirError(t *testing.T) {
1343 blocker := filepath.Join(t.TempDir(), "blocker")
1344 if err := os.WriteFile(blocker, []byte("file"), 0600); err != nil {
1345 t.Fatalf("write blocker: %v", err)
1346 }
1347 store := NewStoreAt(filepath.Join(blocker, MetadataFilename))
1348 if err := store.Save(&CredentialFile{}); err == nil {
1349 t.Fatal("Save returned nil error, want mkdir error")
1350 }
1351}
1352
1353func TestNormalizeGitHTTPURLBranches(t *testing.T) {
1354 tests := []struct {

Callers

nothing calls this directly

Calls 3

NewStoreAtFunction · 0.85
WriteFileMethod · 0.65
SaveMethod · 0.65

Tested by

no test coverage detected