-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixing unit tests, removing test_run_config completely and related ch…
…anges
- Loading branch information
1 parent
71ebf19
commit 868877d
Showing
25 changed files
with
644 additions
and
823 deletions.
There are no files selected for viewing
65 changes: 65 additions & 0 deletions
65
alembic/versions/3189c039e59b_removing_unnecessary_testrunconfig.py
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
"""Removing unnecessary TestRunConfig | ||
Revision ID: 3189c039e59b | ||
Revises: 96ee37627a48 | ||
Create Date: 2023-11-22 17:52:57.970522 | ||
""" | ||
import sqlalchemy as sa | ||
from sqlalchemy.dialects import postgresql | ||
|
||
from alembic import op | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = "3189c039e59b" | ||
down_revision = "96ee37627a48" | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.drop_constraint( | ||
"fk_testrunexecution_test_run_config_id_testrunconfig", | ||
"testrunexecution", | ||
type_="foreignkey", | ||
) | ||
op.drop_column("testrunexecution", "test_run_config_id") | ||
op.drop_index("ix_testrunconfig_id", table_name="testrunconfig") | ||
op.drop_table("testrunconfig") | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.create_table( | ||
"testrunconfig", | ||
sa.Column("id", sa.INTEGER(), autoincrement=True, nullable=False), | ||
sa.Column("name", sa.VARCHAR(), autoincrement=False, nullable=False), | ||
sa.Column("dut_name", sa.VARCHAR(), autoincrement=False, nullable=False), | ||
sa.Column( | ||
"created_at", postgresql.TIMESTAMP(), autoincrement=False, nullable=False | ||
), | ||
sa.Column( | ||
"selected_tests", | ||
postgresql.JSON(astext_type=sa.Text()), | ||
autoincrement=False, | ||
nullable=False, | ||
), | ||
sa.PrimaryKeyConstraint("id", name="pk_testrunconfig"), | ||
) | ||
op.create_index("ix_testrunconfig_id", "testrunconfig", ["id"], unique=False) | ||
op.add_column( | ||
"testrunexecution", | ||
sa.Column( | ||
"test_run_config_id", sa.INTEGER(), autoincrement=False, nullable=True | ||
), | ||
) | ||
op.create_foreign_key( | ||
"fk_testrunexecution_test_run_config_id_testrunconfig", | ||
"testrunexecution", | ||
"testrunconfig", | ||
["test_run_config_id"], | ||
["id"], | ||
) | ||
# ### end Alembic commands ### |
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 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
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
Oops, something went wrong.