fix: make ERP exception menu SQL Server 2016 safe
This commit is contained in:
@@ -31,6 +31,23 @@ class ShadowV3OperationsPackageTest {
|
||||
.isRegularFile();
|
||||
}
|
||||
|
||||
@Test
|
||||
void erpPushExceptionMenuUsesIdentityGeneratedKeys() throws IOException {
|
||||
String script = text("sql/upgrade-erp-push-exception-menu.sql");
|
||||
|
||||
assertThat(script).contains("SCOPE_IDENTITY()");
|
||||
assertThat(script).doesNotContain("MAX(menu_id)", "(menu_id, menu_name");
|
||||
}
|
||||
|
||||
@Test
|
||||
void erpPushExceptionMenuIsAsciiSafeForSqlcmd13() throws IOException {
|
||||
byte[] script = Files.readAllBytes(root.resolve("sql/upgrade-erp-push-exception-menu.sql"));
|
||||
|
||||
for (byte value : script) {
|
||||
assertThat(value & 0x80).as("SQL script byte must be ASCII").isZero();
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
void preflightIsReadOnlyAndChecksExactSourceAndSingleProcess() throws IOException {
|
||||
String script = text("scripts/shadow-v3-preflight.cmd");
|
||||
|
||||
Reference in New Issue
Block a user