Plan icon indicating copy to clipboard operation
Plan copied to clipboard

Some database patches are not automatically tested

Open AuroraLS3 opened this issue 4 years ago • 0 comments

Describe the issue

When fixing an issue with SQLite crash, it was detected that the tests do not test execute every Patch because the database is in a state where the patch does not need to be applied.

! NOT APPLIED: Version10Patch
! NOT APPLIED: GeoInfoLastUsedPatch
! NOT APPLIED: SessionAFKTimePatch
! NOT APPLIED: KillsServerIDPatch
! NOT APPLIED: WorldTimesSeverIDPatch
! NOT APPLIED: WorldsServerIDPatch
! NOT APPLIED: NicknameLastSeenPatch
! NOT APPLIED: VersionTableRemovalPatch
! NOT APPLIED: DiskUsagePatch 
// The DB patch regression test was written with schema that has all above patches already applied
  WAS APPLIED: WorldsOptimizationPatch
  WAS APPLIED: WorldTimesOptimizationPatch
  WAS APPLIED: KillsOptimizationPatch
  WAS APPLIED: SessionsOptimizationPatch
  WAS APPLIED: PingOptimizationPatch
  WAS APPLIED: NicknamesOptimizationPatch
  WAS APPLIED: UserInfoOptimizationPatch
  WAS APPLIED: GeoInfoOptimizationPatch
  WAS APPLIED: TransferTableRemovalPatch
! NOT APPLIED: BadAFKThresholdValuePatch         // No AFK data stored during test
! NOT APPLIED: DeleteIPsPatch                    // No IP data stored during test
! NOT APPLIED: ExtensionShowInPlayersTablePatch  // Extension tables created with latest schema during test
! NOT APPLIED: ExtensionTableRowValueLengthPatch // Extension tables created with latest schema during test
  WAS APPLIED: CommandUsageTableRemovalPatch
! NOT APPLIED: RegisterDateMinimizationPatch     // Tested in another unit test
  WAS APPLIED: BadNukkitRegisterValuePatch
  WAS APPLIED: LinkedToSecurityTablePatch
! NOT APPLIED: LinkUsersToPlayersSecurityTablePatch // No unlinked users I guess
! NOT APPLIED: LitebansTableHeaderPatch             // No broken data stored
! NOT APPLIED: UserInfoHostnamePatch                // Already fixed by previous patch
  WAS APPLIED: ServerIsProxyPatch
! NOT APPLIED: UserInfoHostnameAllowNullPatch       // Already fixed by previous patch

It might be useful to write tests that perform these patches on the intended database schema or data

AuroraLS3 avatar Mar 24 '21 11:03 AuroraLS3