Skip to content

Commit 8965f83

Browse files
committed
fix(test): set apikey in offline error test
1 parent 3e6e7de commit 8965f83

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

test/integration.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -408,6 +408,15 @@ int test_offline_error(const char *db_path) {
408408
rc = db_exec(db, network_init);
409409
RCHECK
410410

411+
const char* apikey = getenv("INTEGRATION_TEST_APIKEY");
412+
if (apikey) {
413+
char set_apikey[512];
414+
snprintf(set_apikey, sizeof(set_apikey),
415+
"SELECT cloudsync_network_set_apikey('%s');", apikey);
416+
rc = db_exec(db, set_apikey);
417+
RCHECK
418+
}
419+
411420
// Try to sync - this should fail with the expected error
412421
char *errmsg = NULL;
413422
rc = sqlite3_exec(db, "SELECT cloudsync_network_sync();", NULL, NULL, &errmsg);

0 commit comments

Comments
 (0)