-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add marker to indicate database mutation in tests * Do not use separate query to identify fieldnames * Add `datasets/status/update` endpoint There is currently no migration test because the test infra- structure makes this hard. Since the PHP calls directly affect the database, we need to ensure we can recover the old database state after the test. We can not generally do this for the dataset status update call, as for that we need to know the initial state of the database. While we do know that tech- nically, we would need to hard-code that information into the tests. A better approach would be to start up a new database container for PHP. A second issue that arises it that if we call an update on the status table from both Python and PHP then the transaction from the first will block the call of the other. This too is mitigated by introducing a second database. The only potential risk you introduce is to be working on different databases. Overall though, the effect of this should be rather minimal as the database would be effectively reset after every individual test. * Update tests to reflect new database state
- Loading branch information
Showing
7 changed files
with
201 additions
and
18 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,13 @@ | ||
NUMBER_OF_DATASETS = 131 | ||
NUMBER_OF_DEACTIVATED_DATASETS = 1 | ||
NUMBER_OF_DATASETS_IN_PREPARATION = 1 | ||
NUMBER_OF_PRIVATE_DATASETS = 1 | ||
NUMBER_OF_ACTIVE_DATASETS = 128 | ||
PRIVATE_DATASET_ID = {130} | ||
IN_PREPARATION_ID = {1, 33} | ||
DEACTIVATED_DATASETS = {2, 131} | ||
DATASETS = set(range(1, 132)) | ||
|
||
PRIVATE_DATASET_ID = 130 | ||
IN_PREPARATION_ID = 1 | ||
NUMBER_OF_DATASETS = len(DATASETS) | ||
NUMBER_OF_DEACTIVATED_DATASETS = len(DEACTIVATED_DATASETS) | ||
NUMBER_OF_DATASETS_IN_PREPARATION = len(IN_PREPARATION_ID) | ||
NUMBER_OF_PRIVATE_DATASETS = len(PRIVATE_DATASET_ID) | ||
NUMBER_OF_ACTIVE_DATASETS = ( | ||
NUMBER_OF_DATASETS - NUMBER_OF_DEACTIVATED_DATASETS - NUMBER_OF_DATASETS_IN_PREPARATION | ||
) | ||
NUMBER_OF_PUBLIC_ACTIVE_DATASETS = NUMBER_OF_ACTIVE_DATASETS - NUMBER_OF_PRIVATE_DATASETS |
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