A community based topic aggregation platform built on atproto

test: update existing tests for new consumer constructor

Updates all integration tests to use the new CommunityEventConsumer
constructor signature with instance DID and skip verification flag.

Changes:
- Updated 5 integration test files
- All tests use skipVerification=true to avoid network calls
- Tests use did:web:coves.local as instance DID
- Maintains existing test behavior and coverage

Files Updated:
- community_blocking_test.go
- community_consumer_test.go
- community_e2e_test.go
- community_v2_validation_test.go
- subscription_indexing_test.go

All existing tests continue to pass with no behavior changes.

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

+2 -1
tests/integration/community_blocking_test.go
···
defer cleanupBlockingTestDB(t, db)
repo := createBlockingTestCommunityRepo(t, db)
-
consumer := jetstream.NewCommunityEventConsumer(repo)
// Create test community
testDID := fmt.Sprintf("did:plc:test-community-%d", time.Now().UnixNano())
···
defer cleanupBlockingTestDB(t, db)
repo := createBlockingTestCommunityRepo(t, db)
+
// Skip verification in tests
+
consumer := jetstream.NewCommunityEventConsumer(repo, "did:web:coves.local", true)
// Create test community
testDID := fmt.Sprintf("did:plc:test-community-%d", time.Now().UnixNano())
+6 -3
tests/integration/community_consumer_test.go
···
}()
repo := postgres.NewCommunityRepository(db)
-
consumer := jetstream.NewCommunityEventConsumer(repo)
ctx := context.Background()
t.Run("creates community from firehose event", func(t *testing.T) {
···
}()
repo := postgres.NewCommunityRepository(db)
-
consumer := jetstream.NewCommunityEventConsumer(repo)
ctx := context.Background()
t.Run("creates subscription from event", func(t *testing.T) {
···
}()
repo := postgres.NewCommunityRepository(db)
-
consumer := jetstream.NewCommunityEventConsumer(repo)
ctx := context.Background()
t.Run("ignores identity events", func(t *testing.T) {
···
}()
repo := postgres.NewCommunityRepository(db)
+
// Skip verification in tests
+
consumer := jetstream.NewCommunityEventConsumer(repo, "did:web:coves.local", true)
ctx := context.Background()
t.Run("creates community from firehose event", func(t *testing.T) {
···
}()
repo := postgres.NewCommunityRepository(db)
+
// Skip verification in tests
+
consumer := jetstream.NewCommunityEventConsumer(repo, "did:web:coves.local", true)
ctx := context.Background()
t.Run("creates subscription from event", func(t *testing.T) {
···
}()
repo := postgres.NewCommunityRepository(db)
+
// Skip verification in tests
+
consumer := jetstream.NewCommunityEventConsumer(repo, "did:web:coves.local", true)
ctx := context.Background()
t.Run("ignores identity events", func(t *testing.T) {
+2 -1
tests/integration/community_e2e_test.go
···
svc.SetPDSAccessToken(accessToken)
}
-
consumer := jetstream.NewCommunityEventConsumer(communityRepo)
// Setup HTTP server with XRPC routes
r := chi.NewRouter()
···
svc.SetPDSAccessToken(accessToken)
}
+
// Skip verification in tests
+
consumer := jetstream.NewCommunityEventConsumer(communityRepo, "did:web:coves.local", true)
// Setup HTTP server with XRPC routes
r := chi.NewRouter()
+4 -2
tests/integration/community_v2_validation_test.go
···
}()
repo := postgres.NewCommunityRepository(db)
-
consumer := jetstream.NewCommunityEventConsumer(repo)
ctx := context.Background()
t.Run("accepts V2 community with rkey=self", func(t *testing.T) {
···
}()
repo := postgres.NewCommunityRepository(db)
-
consumer := jetstream.NewCommunityEventConsumer(repo)
ctx := context.Background()
t.Run("indexes community with atProto handle", func(t *testing.T) {
···
}()
repo := postgres.NewCommunityRepository(db)
+
// Skip verification in tests
+
consumer := jetstream.NewCommunityEventConsumer(repo, "did:web:coves.local", true)
ctx := context.Background()
t.Run("accepts V2 community with rkey=self", func(t *testing.T) {
···
}()
repo := postgres.NewCommunityRepository(db)
+
// Skip verification in tests
+
consumer := jetstream.NewCommunityEventConsumer(repo, "did:web:coves.local", true)
ctx := context.Background()
t.Run("indexes community with atProto handle", func(t *testing.T) {
+6 -3
tests/integration/subscription_indexing_test.go
···
defer cleanupTestDB(t, db)
repo := createTestCommunityRepo(t, db)
-
consumer := jetstream.NewCommunityEventConsumer(repo)
// Create a test community first (with unique DID)
testDID := fmt.Sprintf("did:plc:test-community-%d", time.Now().UnixNano())
···
defer cleanupTestDB(t, db)
repo := createTestCommunityRepo(t, db)
-
consumer := jetstream.NewCommunityEventConsumer(repo)
// Create test community (with unique DID)
testDID := fmt.Sprintf("did:plc:test-unsub-%d", time.Now().UnixNano())
···
defer cleanupTestDB(t, db)
repo := createTestCommunityRepo(t, db)
-
consumer := jetstream.NewCommunityEventConsumer(repo)
// Create test community (with unique DID)
testDID := fmt.Sprintf("did:plc:test-subcount-%d", time.Now().UnixNano())
···
defer cleanupTestDB(t, db)
repo := createTestCommunityRepo(t, db)
+
// Skip verification in tests
+
consumer := jetstream.NewCommunityEventConsumer(repo, "did:web:coves.local", true)
// Create a test community first (with unique DID)
testDID := fmt.Sprintf("did:plc:test-community-%d", time.Now().UnixNano())
···
defer cleanupTestDB(t, db)
repo := createTestCommunityRepo(t, db)
+
// Skip verification in tests
+
consumer := jetstream.NewCommunityEventConsumer(repo, "did:web:coves.local", true)
// Create test community (with unique DID)
testDID := fmt.Sprintf("did:plc:test-unsub-%d", time.Now().UnixNano())
···
defer cleanupTestDB(t, db)
repo := createTestCommunityRepo(t, db)
+
// Skip verification in tests
+
consumer := jetstream.NewCommunityEventConsumer(repo, "did:web:coves.local", true)
// Create test community (with unique DID)
testDID := fmt.Sprintf("did:plc:test-subcount-%d", time.Now().UnixNano())