forked from bluesky-social/atproto
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
More comprehensive testing for PDS views, using snapshots (bluesky-so…
…cial#223) * Create basic seed for server based on view tests * Utilize basic seed in view tests * Split-up pds view tests * Trying out snapshot testing for author feed * Tidy * Generalize normalization for snapshot testing * Snapshot test home feed, fix inclusion of own reposts * Fix typo * Add follow snapshot tests, fix ordering and db date handling * Add like snapshot tests, fix ordering and db date handling * Add notification snapshot tests * Add profile snapshot tests * Add reposts snapshot tests, fix ordering and db date handling * Add thread snapshot tests * Fix typo * Remove unneeded space
- Loading branch information
Showing
28 changed files
with
3,600 additions
and
368 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
import { SeedClient } from './client' | ||
|
||
export default async (sc: SeedClient) => { | ||
await sc.createAccount('alice', users.alice) | ||
await sc.createAccount('bob', users.bob) | ||
await sc.createAccount('carol', users.carol) | ||
await sc.createAccount('dan', users.dan) | ||
await sc.createAccount('eve', users.eve) | ||
await sc.follow(sc.dids.alice, sc.dids.bob) | ||
await sc.follow(sc.dids.alice, sc.dids.carol) | ||
await sc.follow(sc.dids.alice, sc.dids.dan) | ||
await sc.follow(sc.dids.alice, sc.dids.eve) | ||
await sc.follow(sc.dids.carol, sc.dids.alice) | ||
await sc.follow(sc.dids.bob, sc.dids.alice) | ||
await sc.follow(sc.dids.bob, sc.dids.carol) | ||
await sc.follow(sc.dids.dan, sc.dids.alice) | ||
await sc.follow(sc.dids.dan, sc.dids.bob) | ||
await sc.follow(sc.dids.dan, sc.dids.eve) | ||
await sc.follow(sc.dids.eve, sc.dids.alice) | ||
await sc.follow(sc.dids.eve, sc.dids.carol) | ||
} | ||
|
||
const users = { | ||
alice: { | ||
email: '[email protected]', | ||
username: 'alice.test', | ||
password: 'alice-pass', | ||
}, | ||
bob: { | ||
email: '[email protected]', | ||
username: 'bob.test', | ||
password: 'bob-pass', | ||
}, | ||
carol: { | ||
email: '[email protected]', | ||
username: 'carol.test', | ||
password: 'carol-pass', | ||
}, | ||
dan: { | ||
email: '[email protected]', | ||
username: 'dan.test', | ||
password: 'dan-pass', | ||
}, | ||
eve: { | ||
email: '[email protected]', | ||
username: 'eve.test', | ||
password: 'eve-pass', | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import basicSeed from './basic' | ||
import { SeedClient } from './client' | ||
|
||
export default async (sc: SeedClient) => { | ||
await basicSeed(sc) | ||
await sc.createAccount('eve', { | ||
email: '[email protected]', | ||
username: 'eve.test', | ||
password: 'eve-pass', | ||
}) | ||
await sc.like(sc.dids.eve, sc.posts[sc.dids.alice][1].uriRaw) | ||
await sc.like(sc.dids.carol, sc.replies[sc.dids.bob][0].uriRaw) | ||
await sc.like(sc.dids.eve, sc.reposts[sc.dids.dan][0].toString()) | ||
return sc | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import basicSeed from './basic' | ||
import { SeedClient } from './client' | ||
|
||
export default async (sc: SeedClient) => { | ||
await basicSeed(sc) | ||
await sc.createAccount('eve', { | ||
email: '[email protected]', | ||
username: 'eve.test', | ||
password: 'eve-pass', | ||
}) | ||
await sc.repost(sc.dids.bob, sc.posts[sc.dids.alice][2].uriRaw) | ||
await sc.repost(sc.dids.carol, sc.posts[sc.dids.alice][2].uriRaw) | ||
await sc.repost(sc.dids.dan, sc.posts[sc.dids.alice][2].uriRaw) | ||
await sc.repost(sc.dids.eve, sc.posts[sc.dids.alice][2].uriRaw) | ||
await sc.repost(sc.dids.dan, sc.replies[sc.dids.bob][0].uriRaw) | ||
await sc.repost(sc.dids.eve, sc.replies[sc.dids.bob][0].uriRaw) | ||
return sc | ||
} |
Oops, something went wrong.