A community based topic aggregation platform built on atproto

test: update feed tests to use cursorSecret parameter

- Add cursorSecret parameter to all NewCommunityFeedRepository calls
- Use 'test-cursor-secret' for test environments
- Add assertions to verify community handle is present in responses
- All 10 feed integration tests pass with HMAC-signed cursors

Changed files
+16 -10
tests
integration
+16 -10
tests/integration/feed_test.go
···
t.Cleanup(func() { _ = db.Close() })
// Setup services
-
feedRepo := postgres.NewCommunityFeedRepository(db)
communityRepo := postgres.NewCommunityRepository(db)
communityService := communities.NewCommunityService(
communityRepo,
···
assert.NotEmpty(t, record["community"], "Record should have community")
assert.NotEmpty(t, record["author"], "Record should have author")
assert.NotEmpty(t, record["createdAt"], "Record should have createdAt")
}
}
···
t.Cleanup(func() { _ = db.Close() })
// Setup services
-
feedRepo := postgres.NewCommunityFeedRepository(db)
communityRepo := postgres.NewCommunityRepository(db)
communityService := communities.NewCommunityService(
communityRepo,
···
t.Cleanup(func() { _ = db.Close() })
// Setup services
-
feedRepo := postgres.NewCommunityFeedRepository(db)
communityRepo := postgres.NewCommunityRepository(db)
communityService := communities.NewCommunityService(
communityRepo,
···
t.Cleanup(func() { _ = db.Close() })
// Setup services
-
feedRepo := postgres.NewCommunityFeedRepository(db)
communityRepo := postgres.NewCommunityRepository(db)
communityService := communities.NewCommunityService(
communityRepo,
···
t.Cleanup(func() { _ = db.Close() })
// Setup services
-
feedRepo := postgres.NewCommunityFeedRepository(db)
communityRepo := postgres.NewCommunityRepository(db)
communityService := communities.NewCommunityService(
communityRepo,
···
t.Cleanup(func() { _ = db.Close() })
// Setup services
-
feedRepo := postgres.NewCommunityFeedRepository(db)
communityRepo := postgres.NewCommunityRepository(db)
communityService := communities.NewCommunityService(
communityRepo,
···
t.Cleanup(func() { _ = db.Close() })
// Setup services
-
feedRepo := postgres.NewCommunityFeedRepository(db)
communityRepo := postgres.NewCommunityRepository(db)
communityService := communities.NewCommunityService(
communityRepo,
···
t.Cleanup(func() { _ = db.Close() })
// Setup services
-
feedRepo := postgres.NewCommunityFeedRepository(db)
communityRepo := postgres.NewCommunityRepository(db)
communityService := communities.NewCommunityService(
communityRepo,
···
t.Cleanup(func() { _ = db.Close() })
// Setup services
-
feedRepo := postgres.NewCommunityFeedRepository(db)
communityRepo := postgres.NewCommunityRepository(db)
communityService := communities.NewCommunityService(
communityRepo,
···
t.Cleanup(func() { _ = db.Close() })
// Setup services
-
feedRepo := postgres.NewCommunityFeedRepository(db)
communityRepo := postgres.NewCommunityRepository(db)
communityService := communities.NewCommunityService(
communityRepo,
···
t.Cleanup(func() { _ = db.Close() })
// Setup services
+
feedRepo := postgres.NewCommunityFeedRepository(db, "test-cursor-secret")
communityRepo := postgres.NewCommunityRepository(db)
communityService := communities.NewCommunityService(
communityRepo,
···
assert.NotEmpty(t, record["community"], "Record should have community")
assert.NotEmpty(t, record["author"], "Record should have author")
assert.NotEmpty(t, record["createdAt"], "Record should have createdAt")
+
+
// Verify community reference includes handle (following atProto pattern)
+
assert.NotNil(t, feedPost.Post.Community, "Post %d should have community reference", i)
+
assert.NotEmpty(t, feedPost.Post.Community.Handle, "Post %d community should have handle", i)
+
assert.NotEmpty(t, feedPost.Post.Community.DID, "Post %d community should have DID", i)
+
assert.NotEmpty(t, feedPost.Post.Community.Name, "Post %d community should have name", i)
}
}
···
t.Cleanup(func() { _ = db.Close() })
// Setup services
+
feedRepo := postgres.NewCommunityFeedRepository(db, "test-cursor-secret")
communityRepo := postgres.NewCommunityRepository(db)
communityService := communities.NewCommunityService(
communityRepo,
···
t.Cleanup(func() { _ = db.Close() })
// Setup services
+
feedRepo := postgres.NewCommunityFeedRepository(db, "test-cursor-secret")
communityRepo := postgres.NewCommunityRepository(db)
communityService := communities.NewCommunityService(
communityRepo,
···
t.Cleanup(func() { _ = db.Close() })
// Setup services
+
feedRepo := postgres.NewCommunityFeedRepository(db, "test-cursor-secret")
communityRepo := postgres.NewCommunityRepository(db)
communityService := communities.NewCommunityService(
communityRepo,
···
t.Cleanup(func() { _ = db.Close() })
// Setup services
+
feedRepo := postgres.NewCommunityFeedRepository(db, "test-cursor-secret")
communityRepo := postgres.NewCommunityRepository(db)
communityService := communities.NewCommunityService(
communityRepo,
···
t.Cleanup(func() { _ = db.Close() })
// Setup services
+
feedRepo := postgres.NewCommunityFeedRepository(db, "test-cursor-secret")
communityRepo := postgres.NewCommunityRepository(db)
communityService := communities.NewCommunityService(
communityRepo,
···
t.Cleanup(func() { _ = db.Close() })
// Setup services
+
feedRepo := postgres.NewCommunityFeedRepository(db, "test-cursor-secret")
communityRepo := postgres.NewCommunityRepository(db)
communityService := communities.NewCommunityService(
communityRepo,
···
t.Cleanup(func() { _ = db.Close() })
// Setup services
+
feedRepo := postgres.NewCommunityFeedRepository(db, "test-cursor-secret")
communityRepo := postgres.NewCommunityRepository(db)
communityService := communities.NewCommunityService(
communityRepo,
···
t.Cleanup(func() { _ = db.Close() })
// Setup services
+
feedRepo := postgres.NewCommunityFeedRepository(db, "test-cursor-secret")
communityRepo := postgres.NewCommunityRepository(db)
communityService := communities.NewCommunityService(
communityRepo,
···
t.Cleanup(func() { _ = db.Close() })
// Setup services
+
feedRepo := postgres.NewCommunityFeedRepository(db, "test-cursor-secret")
communityRepo := postgres.NewCommunityRepository(db)
communityService := communities.NewCommunityService(
communityRepo,