aboutsummaryrefslogtreecommitdiff
path: root/tests/unit/auth/test_migrations_create_tables.py
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2023-10-02 09:00:13 +0300
committerFrederick Muriuki Muriithi2023-10-02 09:00:13 +0300
commitdd00a799a7f8b00c7f27460cb2be2b39b8a47c1c (patch)
treec8416fdaafc7b5006d33f550c840392c08d701dc /tests/unit/auth/test_migrations_create_tables.py
parent90d1b58ebd169158dd2022565ce23d78c9230085 (diff)
downloadgn-auth-dd00a799a7f8b00c7f27460cb2be2b39b8a47c1c.tar.gz
migrations: New migration - InbredSet Resources
Provide a new migration to create tables to handle the InbredSet resources. The migration also sets up the resource category and the related privileges.
Diffstat (limited to 'tests/unit/auth/test_migrations_create_tables.py')
-rw-r--r--tests/unit/auth/test_migrations_create_tables.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/unit/auth/test_migrations_create_tables.py b/tests/unit/auth/test_migrations_create_tables.py
index 8b0f36e..90c3fb8 100644
--- a/tests/unit/auth/test_migrations_create_tables.py
+++ b/tests/unit/auth/test_migrations_create_tables.py
@@ -43,7 +43,11 @@ migrations_and_tables = (
("20230907_01_pjnxz-refactor-add-resource-ownership-table.py",
"resource_ownership"),
("20230907_04_3LnrG-refactor-create-group-resources-table.py",
- "group_resources"))
+ "group_resources"),
+ ("20231002_01_tzxTf-link-inbredsets-to-auth-system.py",
+ "linked_inbredset_groups"),
+ ("20231002_01_tzxTf-link-inbredsets-to-auth-system.py",
+ "inbredset_group_resources"))
@pytest.mark.unit_test
@pytest.mark.parametrize("migration_file,the_table", migrations_and_tables)
@@ -64,6 +68,7 @@ def test_create_table(
apply_single_migration(backend, get_migration(migration_path))
cursor.execute("SELECT name FROM sqlite_schema WHERE type='table'")
result_after_migration = cursor.fetchall()
+ rollback_single_migration(backend, get_migration(migration_path))
rollback_migrations(backend, older_migrations)
assert the_table not in [row[0] for row in result_before_migration]