Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mfvanek committed Nov 1, 2024
1 parent db3c498 commit 7c232a8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ void shouldCollectHealthData() {
"db_indexes_health\tduplicated_indexes\t1",
"db_indexes_health\tintersected_indexes\t2",
"db_indexes_health\tunused_indexes\t0",
"db_indexes_health\tforeign_keys_without_index\t4",
"db_indexes_health\tforeign_keys_without_index\t5",
"db_indexes_health\ttables_with_missing_indexes\t0",
"db_indexes_health\ttables_without_primary_key\t1",
"db_indexes_health\tindexes_with_null_values\t1",
Expand All @@ -43,7 +43,8 @@ void shouldCollectHealthData() {
"db_indexes_health\tduplicated_foreign_keys\t1",
"db_indexes_health\tintersected_foreign_keys\t0",
"db_indexes_health\tpossible_object_name_overflow\t1",
"db_indexes_health\ttables_not_linked_to_others\t0");
"db_indexes_health\ttables_not_linked_to_others\t0",
"db_indexes_health\tforeign_keys_with_unmatched_column_type\t1");
final List<String> healthData = HealthDataCollector.collectHealthData(getConnectionFactory(), getConnectionCredentials());
assertThat(healthData)
.hasSameSizeAs(Diagnostic.values())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ static void restoreSchema() {
void generateMigrationsShouldWork() {
final List<ForeignKey> foreignKeys = MigrationsGenerator.getForeignKeysNotCoveredWithIndex(getConnectionFactory(), getConnectionCredentials());
assertThat(foreignKeys)
.hasSize(4);
.hasSize(5);
MigrationsGenerator.generateMigrations(getDataSource(), foreignKeys);
assertThat(MigrationsGenerator.getForeignKeysNotCoveredWithIndex(getConnectionFactory(), getConnectionCredentials()))
.isEmpty();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ void collectHealthDataShouldReturnOk() {
"duplicated_indexes:1",
"intersected_indexes:2",
"unused_indexes:0",
"foreign_keys_without_index:4",
"foreign_keys_without_index:5",
"tables_with_missing_indexes:0",
"tables_without_primary_key:1",
"indexes_with_null_values:1",
Expand All @@ -54,6 +54,7 @@ void collectHealthDataShouldReturnOk() {
"duplicated_foreign_keys:1",
"intersected_foreign_keys:0",
"possible_object_name_overflow:1",
"tables_not_linked_to_others:0");
"tables_not_linked_to_others:0",
"foreign_keys_with_unmatched_column_type:1");
}
}

0 comments on commit 7c232a8

Please sign in to comment.