-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Use Postgres as test database Signed-off-by: Babak K. Shandiz <babak.k.shandiz@canonical.com> * Remove SQLite support Signed-off-by: Babak K. Shandiz <babak.k.shandiz@canonical.com> * Delete SQLite migration files Signed-off-by: Babak K. Shandiz <babak.k.shandiz@canonical.com> * Use `JIMM_TEST_PGXDSN` env var for tests Signed-off-by: Babak K. Shandiz <babak.k.shandiz@canonical.com> * Update godoc replacing SQLite with Postgres Signed-off-by: Babak K. Shandiz <babak.k.shandiz@canonical.com> * Update `JIMM_TEST_PGXDSN` env var Signed-off-by: Babak K. Shandiz <babak.k.shandiz@canonical.com> * Remove SQLite/dqlite errors Signed-off-by: Babak K. Shandiz <babak.k.shandiz@canonical.com> * Delete SQLite/dqlite tests files Signed-off-by: Babak K. Shandiz <babak.k.shandiz@canonical.com> * Make `postgresSuite` tests mandatory to run Signed-off-by: Babak K. Shandiz <babak.k.shandiz@canonical.com> * Apply `go mod tidy` to remove SQLite related modules Signed-off-by: Babak K. Shandiz <babak.k.shandiz@canonical.com> * Drop lower-casing schema name Signed-off-by: Babak K. Shandiz <babak.k.shandiz@canonical.com> * Add `CreateEmptyDatabase` helper function Signed-off-by: Babak K. Shandiz <babak.k.shandiz@canonical.com> * Use `jimmtest.CreateEmptyDatabase` in suite set-up Signed-off-by: Babak K. Shandiz <babak.k.shandiz@canonical.com> * Use double-quote to reference names with upper-case chars Signed-off-by: Babak K. Shandiz <babak.k.shandiz@canonical.com> * Use lower-case database/schema names Signed-off-by: Babak K. Shandiz <babak.k.shandiz@canonical.com> * Fix typo Signed-off-by: Babak K. Shandiz <babak.k.shandiz@canonical.com> * Refactor toward creating new databases from template Signed-off-by: Babak K. Shandiz <babak.k.shandiz@canonical.com> * Close connection after creating new database Signed-off-by: Babak K. Shandiz <babak.k.shandiz@canonical.com> * Add missing DSN in JIMM service params Signed-off-by: Babak K. Shandiz <babak.k.shandiz@canonical.com> * Add `Close` method to `Database` type Signed-off-by: Babak K. Shandiz <babak.k.shandiz@canonical.com> * Close database connection at tear down Signed-off-by: Babak K. Shandiz <babak.k.shandiz@canonical.com> * Fix error message Signed-off-by: Babak K. Shandiz <babak.k.shandiz@canonical.com> * Close database connection on test clean-up/tear-down Signed-off-by: Babak K. Shandiz <babak.k.shandiz@canonical.com> * Separate functions to create empty and templated databases Signed-off-by: Babak K. Shandiz <babak.k.shandiz@canonical.com> * Avoid name collision when truncating long database names Signed-off-by: Babak K. Shandiz <babak.k.shandiz@canonical.com> * Make unique names for template databases Signed-off-by: Babak K. Shandiz <babak.k.shandiz@canonical.com> * Fix typo in comment Signed-off-by: Babak K. Shandiz <babak.k.shandiz@canonical.com> * Add `fsync=false` option to improve db performance Signed-off-by: Babak K. Shandiz <babak.k.shandiz@canonical.com> * Disable 'full_page_writes' to improve testing performance Signed-off-by: Babak K. Shandiz <babak.k.shandiz@canonical.com> * Avoid name collision when only casing is different Signed-off-by: Babak K. Shandiz <babak.k.shandiz@canonical.com> * Change expected error regexp to PG equivalent Signed-off-by: Babak K. Shandiz <babak.k.shandiz@canonical.com> * Set `time.Now` to precision ms at service level Signed-off-by: Babak K. Shandiz <babak.k.shandiz@canonical.com> * Override unprovided nowFunc with ms precision to match service setup Signed-off-by: Babak K. Shandiz <babak.k.shandiz@canonical.com> * Limit `time.Now()` precision Signed-off-by: Babak K. Shandiz <babak.k.shandiz@canonical.com> * Wrap `nowFunc` to truncate returned time precision Signed-off-by: Babak K. Shandiz <babak.k.shandiz@canonical.com> * Limit `time.Now()` precision Signed-off-by: Babak K. Shandiz <babak.k.shandiz@canonical.com> * Limit `time.Now()` precision Signed-off-by: Babak K. Shandiz <babak.k.shandiz@canonical.com> * Remove extra blank line Signed-off-by: Babak K. Shandiz <babak.k.shandiz@canonical.com> * Improve error message when dropping a database fails Signed-off-by: Babak K. Shandiz <babak.k.shandiz@canonical.com> * Fix vault test with applying an env Signed-off-by: Babak K. Shandiz <babak.k.shandiz@canonical.com> * Fix test setup with creating required test clouds Signed-off-by: Babak K. Shandiz <babak.k.shandiz@canonical.com> * Fix checking for context cancellation Signed-off-by: Babak K. Shandiz <babak.k.shandiz@canonical.com> * Fix potential slice ordering issue for deep-equal assertion Signed-off-by: Babak K. Shandiz <babak.k.shandiz@canonical.com> * Increase test job timeout to 1h Signed-off-by: Babak K. Shandiz <babak.k.shandiz@canonical.com> * Compose `jimmSuite` from `JujuConnSuite` instead of `JIMMSuite` Signed-off-by: Babak K. Shandiz <babak.k.shandiz@canonical.com> * Rename 'MemoryDB` function to `PostgresDB` Signed-off-by: Babak K. Shandiz <babak.k.shandiz@canonical.com> --------- Signed-off-by: Babak K. Shandiz <babak.k.shandiz@canonical.com> Co-authored-by: Ales Stimec <ales.stimec@canonical.com>
- Loading branch information
1 parent
67090f7
commit be79a3c
Showing
49 changed files
with
469 additions
and
598 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 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 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 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 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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains 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 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 was deleted.
Oops, something went wrong.
This file contains 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 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 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
Oops, something went wrong.