-
Notifications
You must be signed in to change notification settings - Fork 0
feat(react-native): move rn deps to peerdeps, fix(test): auto remove test dbs #199
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 2 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
809e310
move react native dependencies to peer
Gioee 58e80e3
clean test databases script
Gioee f889b05
fix auto remove db, rm clean test script
Gioee 8abd0e3
skipping test that leaves open handles
Gioee 6ca5657
manually update dependabot prs; close #202 close #201 close #200
Gioee File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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,40 @@ | ||
| /** | ||
| * clean.test.ts - clean test databases | ||
| */ | ||
|
|
||
| import { describe, it } from '@jest/globals' | ||
| import { getChinookDatabase } from './shared' | ||
|
|
||
| describe.skip('clean test suite', () => { | ||
| it('should remove test databases from the project', async () => { | ||
| let chinook | ||
| try { | ||
| chinook = getChinookDatabase() | ||
| // Use the connect utility to execute SQL statements on the selected database | ||
| const result = await chinook.sql(`LIST DATABASES`) | ||
| const limit = 1000 | ||
| let removed = [] | ||
| let dbname = '' | ||
| for (let i = 0; i < result.length; i++) { | ||
| dbname = result[i].name | ||
| if ((dbname.startsWith('1brc') && dbname.includes('-2025')) || dbname.startsWith('testing-2025')) { | ||
| removed.push(dbname) | ||
| // console.log("remove ${dbname}") | ||
| const r = await chinook.sql(`REMOVE DATABASE ${dbname}`) | ||
| if (removed.length >= limit) { | ||
| break | ||
| } | ||
| } | ||
| } | ||
|
|
||
| // Build the object to be returned by your edge function | ||
| const message = `Number of databases: ${result.length}, removed ${removed.length}` | ||
|
|
||
| // Return the object from your edge function | ||
|
|
||
| console.debug({ message, removed }) | ||
| } finally { | ||
| chinook?.close() | ||
| } | ||
| }) | ||
| }) | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.