fixed operation template unit tests

This commit is contained in:
Amalka Subasinghe 2023-07-07 11:16:53 +05:30 committed by pasindu
parent 80b42315d7
commit 5b85778d27
2 changed files with 4 additions and 0 deletions

View File

@ -144,6 +144,7 @@ public abstract class BaseOperationTemplatePluginTest {
conn = ConnectionManagerUtils.getDBConnection();
stmt = conn.createStatement();
stmt.executeUpdate("RUNSCRIPT FROM './src/test/resources/carbon-home/dbscripts/dm-db-h2.sql'");
stmt.executeUpdate("RUNSCRIPT FROM './src/test/resources/carbon-home/dbscripts/insert-subtypes.sql'");
} finally {
TestUtils.cleanupResources(conn, stmt, null);
}

View File

@ -0,0 +1,3 @@
INSERT INTO DM_DEVICE_SUB_TYPE (SUB_TYPE_ID, TENANT_ID, DEVICE_TYPE, SUB_TYPE_NAME, TYPE_DEFINITION) VALUES
(3,-1234,'METER','TestSubType','{"make": "TestSubType", "model": "ATx-Mega SIM800", "subTypeId": 3, "hasSMSSupport": true, "hasICMPSupport": true, "socketServerPort": 8071}'),
(4,-1234,'METER','TestSubType','{"make": "TestSubType", "model": "ATx-Mega SIM800", "subTypeId": 4, "hasSMSSupport": true, "hasICMPSupport": true, "socketServerPort": 8071}');