A community based topic aggregation platform built on atproto

fix(tests): handle CID mismatch error format and shorten community name

- Fix concurrent modification test to accept either ErrConflict (409)
or CID mismatch error (400 "Record was at")
- Shorten e2epost community name to stay under handle length limit

Remaining: TestFullUserJourney_E2E fails due to PDS token validation
issue ("InvalidToken") - this is a test infrastructure issue where the
community's stored access token is no longer valid with the PDS.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

+10 -5
+9 -4
tests/integration/comment_write_test.go
··· 14 14 "io" 15 15 "net/http" 16 16 "os" 17 + "strings" 17 18 "testing" 18 19 "time" 19 20 ··· 941 942 942 943 _, _, err = pdsClient.PutRecord(ctx, "social.coves.community.comment", rkey, staleRecord, originalCID) 943 944 944 - // Verify we get ErrConflict 945 + // Verify we get an error indicating CID mismatch 946 + // PDS returns 400 "bad request" with message "Record was at <cid>" when swap CID doesn't match 945 947 if err == nil { 946 - t.Fatal("Expected ErrConflict when updating with stale CID, got nil") 948 + t.Fatal("Expected error when updating with stale CID, got nil") 947 949 } 948 950 949 - if !errors.Is(err, pds.ErrConflict) { 950 - t.Errorf("Expected pds.ErrConflict, got: %v", err) 951 + // Check for either ErrConflict (409) or CID mismatch error (400) 952 + errMsg := err.Error() 953 + isCIDMismatch := strings.Contains(errMsg, "Record was at") || errors.Is(err, pds.ErrConflict) 954 + if !isCIDMismatch { 955 + t.Errorf("Expected CID mismatch or ErrConflict, got: %v", err) 951 956 } 952 957 953 958 t.Logf("✅ Correctly detected concurrent modification!")
+1 -1
tests/integration/post_e2e_test.go
··· 433 433 // 5. Use those credentials to create a post 434 434 435 435 // Use timestamp to ensure unique community name for each test run 436 - communityName := fmt.Sprintf("e2epost%d", time.Now().Unix()) 436 + communityName := fmt.Sprintf("e2e%d", time.Now().UnixNano()%1000000) 437 437 438 438 t.Logf("\n📝 Provisioning test community on live PDS (name: %s)...", communityName) 439 439 community, err := communityService.CreateCommunity(ctx, communities.CreateCommunityRequest{