Skip to content

Commit bfacc3b

Browse files
committed
test(kiro): clear the platform store between seeds, not just the macOS one
Second ubuntu failure from the same lidge-jun#718 family, surfaced by the first fix turning five failures into one. `inspectKiroCliSqlite distinguishes token_missing and invalid_json` seeds a database, asserts, then re-seeds to exercise the invalid-JSON branch. Its mid-test cleanup removed only `$tmp/Library`, which is the macOS store. On Linux the database lives at `.local/share/kiro-cli`, so it survived and the second seed hit `SQLiteError: table auth_kv already exists`. Removing `kiroCliDbDir()` instead follows the platform, exactly as the seeding side already did. Confirmed the asymmetry: a Library-only removal covers the darwin store and neither the win32 nor the linux one. Gates: tsc clean; kiro-oauth + kiro-windows-cli-db-path 57 pass 0 fail.
1 parent 8f499a4 commit bfacc3b

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

tests/kiro-oauth.test.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -654,7 +654,10 @@ describe("kiro oauth — import-first", () => {
654654
expect(missing.token).toBeNull();
655655
expect(missing.diagnostics).toContainEqual({ location: kiroCliDbLocation(), status: "token_missing" });
656656

657-
rmSync(join(tmp, "Library"), { recursive: true, force: true });
657+
// Drop the seeded database before re-seeding. This has to follow the platform: removing only
658+
// `Library` left the Linux store at `.local/share` in place, so the second seed hit
659+
// "table auth_kv already exists" and the case failed on ubuntu CI while passing on macOS (#718).
660+
rmSync(kiroCliDbDir(), { recursive: true, force: true });
658661
seedKiroCliRawValue("{not json");
659662

660663
const invalid = inspectKiroCliSqlite();

0 commit comments

Comments
 (0)