Skip to content

Commit

Permalink
Fix failing CI (bluesky-social#3000)
Browse files Browse the repository at this point in the history
* fix

* use distinct pg schemas for all tests
  • Loading branch information
matthieusieben authored Nov 14, 2024
1 parent 3a5fc92 commit 879a74f
Showing 9 changed files with 18 additions and 14 deletions.
5 changes: 3 additions & 2 deletions packages/api/src/client/lexicons.ts
Original file line number Diff line number Diff line change
@@ -13327,8 +13327,9 @@ export const schemaDict = {
},
},
},
}
export const schemas: LexiconDoc[] = Object.values(schemaDict) as LexiconDoc[]
} as const satisfies Record<string, LexiconDoc>

export const schemas = Object.values(schemaDict)
export const lexicons: Lexicons = new Lexicons(schemas)
export const ids = {
ComAtprotoAdminDefs: 'com.atproto.admin.defs',
2 changes: 1 addition & 1 deletion packages/api/tests/atp-agent.test.ts
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@ describe('agent', () => {

beforeAll(async () => {
network = await TestNetworkNoAppView.create({
dbPostgresSchema: 'bsky_agent',
dbPostgresSchema: 'api_atp_agent',
})
})

2 changes: 1 addition & 1 deletion packages/api/tests/moderation-prefs.test.ts
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@ describe('agent', () => {

beforeAll(async () => {
network = await TestNetworkNoAppView.create({
dbPostgresSchema: 'bsky_agent',
dbPostgresSchema: 'api_moderation_prefs',
})
})

5 changes: 3 additions & 2 deletions packages/bsky/src/lexicon/lexicons.ts
Original file line number Diff line number Diff line change
@@ -10566,8 +10566,9 @@ export const schemaDict = {
},
},
},
}
export const schemas: LexiconDoc[] = Object.values(schemaDict) as LexiconDoc[]
} as const satisfies Record<string, LexiconDoc>

export const schemas = Object.values(schemaDict)
export const lexicons: Lexicons = new Lexicons(schemas)
export const ids = {
ComAtprotoAdminDefs: 'com.atproto.admin.defs',
2 changes: 1 addition & 1 deletion packages/bsky/tests/query-labels.test.ts
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@ describe('label hydration', () => {

beforeAll(async () => {
network = await TestNetwork.create({
dbPostgresSchema: 'bsky_label_hydration',
dbPostgresSchema: 'bsky_query_labels',
})
pdsAgent = network.pds.getClient()
sc = network.getSeedClient()
2 changes: 1 addition & 1 deletion packages/bsky/tests/views/known-followers.test.ts
Original file line number Diff line number Diff line change
@@ -14,7 +14,7 @@ describe('known followers (social proof)', () => {

beforeAll(async () => {
network = await TestNetwork.create({
dbPostgresSchema: 'bsky_views_block',
dbPostgresSchema: 'bsky_known_followers',
})
agent = network.bsky.getClient()
pdsAgent = network.pds.getClient()
5 changes: 3 additions & 2 deletions packages/ozone/src/lexicon/lexicons.ts
Original file line number Diff line number Diff line change
@@ -13327,8 +13327,9 @@ export const schemaDict = {
},
},
},
}
export const schemas: LexiconDoc[] = Object.values(schemaDict) as LexiconDoc[]
} as const satisfies Record<string, LexiconDoc>

export const schemas = Object.values(schemaDict)
export const lexicons: Lexicons = new Lexicons(schemas)
export const ids = {
ComAtprotoAdminDefs: 'com.atproto.admin.defs',
4 changes: 2 additions & 2 deletions packages/ozone/tests/3p-labeler.test.ts
Original file line number Diff line number Diff line change
@@ -23,7 +23,7 @@ describe('labels from 3p labelers', () => {

beforeAll(async () => {
network = await TestNetwork.create({
dbPostgresSchema: 'ozone_admin_third_party_labeler',
dbPostgresSchema: 'ozone_admin_third_party_labeler_main',
})
ozone = network.ozone

@@ -34,7 +34,7 @@ describe('labels from 3p labelers', () => {
plcUrl: network.plc.url,
signingKey: ozoneKey,
serverDid: ozoneDid,
dbPostgresSchema: `ozone_admin_third_party_labeler`,
dbPostgresSchema: `ozone_admin_third_party_labeler_third_party`,
dbPostgresUrl: ozone.ctx.cfg.db.postgresUrl,
appviewUrl: network.bsky.url,
appviewDid: network.bsky.ctx.cfg.serverDid,
5 changes: 3 additions & 2 deletions packages/pds/src/lexicon/lexicons.ts
Original file line number Diff line number Diff line change
@@ -13327,8 +13327,9 @@ export const schemaDict = {
},
},
},
}
export const schemas: LexiconDoc[] = Object.values(schemaDict) as LexiconDoc[]
} as const satisfies Record<string, LexiconDoc>

export const schemas = Object.values(schemaDict)
export const lexicons: Lexicons = new Lexicons(schemas)
export const ids = {
ComAtprotoAdminDefs: 'com.atproto.admin.defs',

0 comments on commit 879a74f

Please sign in to comment.