Class PatchChecks
java.lang.Object
de.chojo.sadu.testing.PatchChecks
The PatchChecks class provides methods for checking the presence of patch files for the databases.
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidcheckFiles(int baseVersion, Database<?, ?>... databases) Checks if files in the given databases match the specified base version.static voidcheckFiles(int baseVersion, String currentVersion, Database<?, ?>... databases) Checks if the files for the given databases need to be updated based on the base version and current version.static voidcheckFiles(int baseVersion, String currentVersion, String... databases) Check the consistency of files in the given databases against a reference set of files.
-
Method Details
-
checkFiles
Checks if files in the given databases match the specified base version. Compares the file content of each database against the base version and throws an IOException if any mismatch is found.- Parameters:
baseVersion- The lowest major version of the databases.databases- The databases to check.- Throws:
IOException- If there is a mismatch between the file content in any of the databases and the base version.
-
checkFiles
@Internal public static void checkFiles(int baseVersion, String currentVersion, Database<?, ?>... databases) throws IOExceptionChecks if the files for the given databases need to be updated based on the base version and current version.- Parameters:
baseVersion- the base version of the databasescurrentVersion- the current version of the databasesdatabases- the databases to check- Throws:
IOException- if an I/O error occurs while checking the files
-
checkFiles
@Internal public static void checkFiles(int baseVersion, String currentVersion, String... databases) throws IOException Check the consistency of files in the given databases against a reference set of files.- Parameters:
baseVersion- The base version of the database.currentVersion- The current version of the database.databases- The names of the databases to check.- Throws:
IOException- If an I/O error occurs while accessing the files.org.opentest4j.AssertionFailedError- If there are missing or unreachable files in the databases.
-