Skip to content

A free and open source instant messaging and VoIP chat app built for friends, groups, and communities.

TypeScript fluxerfluxerapp

fix(ci): repair admin test config and a ttl race in api tests (#3054)

Hampus360b984adca4
diff --git a/fluxer_admin/tests/notification_writes.rs b/fluxer_admin/tests/notification_writes.rs
index c5230fec7..26507274a 100644
--- a/fluxer_admin/tests/notification_writes.rs
+++ b/fluxer_admin/tests/notification_writes.rs
@@ -354,12 +354,10 @@ fn test_config(api_endpoint: String) -> AdminConfig {
static_cdn_endpoint: "https://static.example.test".to_owned(),
admin_endpoint: "https://admin.example.test".to_owned(),
web_app_endpoint: "https://app.example.test".to_owned(),
- kv_url: String::new(),
oauth_client_id: "admin-client".to_owned(),
oauth_client_secret: "admin-secret".to_owned(),
oauth_redirect_uri: "https://admin.example.test/callback".to_owned(),
build_version: "test".to_owned(),
- release_channel: "test".to_owned(),
self_hosted: false,
proxy: ProxyConfig {
trust_client_ip_header: false,
diff --git a/fluxer_api/src/api/worker/tests/BlocklistFeedStartup.test.ts b/fluxer_api/src/api/worker/tests/BlocklistFeedStartup.test.ts
index 147932fd9..51eb61014 100644
--- a/fluxer_api/src/api/worker/tests/BlocklistFeedStartup.test.ts
+++ b/fluxer_api/src/api/worker/tests/BlocklistFeedStartup.test.ts
@@ -62,7 +62,9 @@ describe('queueBlocklistFeedStartupJobs', () => {
expect(await kv.exists(INITIAL_SYNC_KEY)).toBe(0);
await queueBlocklistFeedStartupJobs(kv, createWorkerService(), true);
- expect(await kv.ttl(INITIAL_SYNC_KEY)).toBe(21600);
+ const ttl = await kv.ttl(INITIAL_SYNC_KEY);
+ expect(ttl).toBeGreaterThanOrEqual(21599);
+ expect(ttl).toBeLessThanOrEqual(21600);
});
it('a full jobs stream drops the job without failing startup', async () => {