Skip to content
代码片段 群组 项目
提交 faab6150 编辑于 作者: Timotej Ecimovic's avatar Timotej Ecimovic
浏览文件

Convert test files, update device identifier on import.

上级 6f2e57d0
No related branches found
No related tags found
无相关合并请求
......@@ -39,13 +39,15 @@ INSERT INTO ENDPOINT (
PROFILE,
ENDPOINT_IDENTIFIER,
NETWORK_IDENTIFIER,
DEVICE_VERSION
DEVICE_VERSION,
DEVICE_IDENTIFIER
) VALUES (
?,
?,
?,
?,
?,
?,
?
)
`,
......@@ -56,6 +58,7 @@ INSERT INTO ENDPOINT (
endpoint.endpointId,
endpoint.networkId,
endpoint.endpointVersion,
endpoint.deviceIdentifier,
]
)
}
......@@ -80,6 +83,7 @@ async function exportEndpoints(db, sessionId, endpointTypes) {
endpointId: x.ENDPOINT_IDENTIFIER,
networkId: x.NETWORK_IDENTIFIER,
endpointVersion: x.DEVICE_VERSION,
deviceIdentifier: x.DEVICE_IDENTIFIER,
}
}
return dbApi
......@@ -92,7 +96,8 @@ SELECT
ENDPOINT.PROFILE,
ENDPOINT.ENDPOINT_IDENTIFIER,
ENDPOINT.NETWORK_IDENTIFIER,
ENDPOINT.DEVICE_VERSION
ENDPOINT.DEVICE_VERSION,
ENDPOINT.DEVICE_IDENTIFIER
FROM
ENDPOINT
LEFT JOIN
......
......@@ -150,7 +150,7 @@ test('test-light isc read', async () => {
expect(state.attributeType.length).toBe(6)
})
test.only('test-light isc import', async () => {
test('test-light isc import', async () => {
sid = await querySession.createBlankSession(db)
await importJs.importDataFromFile(db, testLightIsc, sid)
expect(sid).not.toBeUndefined()
......
{
"featureLevel": 26,
"featureLevel": 28,
"creator": "zap",
"keyValuePairs": [
{
......@@ -3860,14 +3860,18 @@
"endpointTypeIndex": 0,
"profileId": 260,
"endpointId": 1,
"networkId": 0
"networkId": 0,
"endpointVersion": null,
"deviceIdentifier": null
},
{
"endpointTypeName": "Anonymous Endpoint Type",
"endpointTypeIndex": 1,
"profileId": 260,
"endpointId": 2,
"networkId": 0
"networkId": 0,
"endpointVersion": null,
"deviceIdentifier": null
}
]
}
\ No newline at end of file
此差异已折叠。
此差异已折叠。
{
"featureLevel": 26,
"featureLevel": 28,
"creator": "zap",
"keyValuePairs": [
{
......@@ -4390,21 +4390,27 @@
"endpointTypeIndex": 1,
"profileId": 260,
"endpointId": 1,
"networkId": "Primary"
"networkId": "Primary",
"endpointVersion": 1,
"deviceIdentifier": -1
},
{
"endpointTypeName": "Touchlink",
"endpointTypeIndex": 2,
"profileId": 260,
"endpointId": 2,
"networkId": "Primary"
"networkId": "Primary",
"endpointVersion": 1,
"deviceIdentifier": 269
},
{
"endpointTypeName": "GreenPower",
"endpointTypeIndex": 3,
"profileId": 41440,
"endpointId": 242,
"networkId": "Primary"
"networkId": "Primary",
"endpointVersion": 1,
"deviceIdentifier": -1
}
]
}
\ No newline at end of file
{
"featureLevel": 26,
"featureLevel": 28,
"creator": "zap",
"keyValuePairs": [
{
......
{
"featureLevel": 26,
"featureLevel": 28,
"creator": "zap",
"keyValuePairs": [
{
......
{
"featureLevel": 26,
"featureLevel": 28,
"creator": "zap",
"keyValuePairs": [
{
......
{
"featureLevel": 26,
"featureLevel": 28,
"creator": "zap",
"keyValuePairs": [
{
......@@ -4390,21 +4390,27 @@
"endpointTypeIndex": 1,
"profileId": 260,
"endpointId": 1,
"networkId": "Primary"
"networkId": "Primary",
"endpointVersion": null,
"deviceIdentifier": null
},
{
"endpointTypeName": "Touchlink",
"endpointTypeIndex": 2,
"profileId": 260,
"endpointId": 2,
"networkId": "Primary"
"networkId": "Primary",
"endpointVersion": null,
"deviceIdentifier": null
},
{
"endpointTypeName": "GreenPower",
"endpointTypeIndex": 3,
"profileId": 41440,
"endpointId": 242,
"networkId": "Primary"
"networkId": "Primary",
"endpointVersion": null,
"deviceIdentifier": null
}
]
}
\ No newline at end of file
{
"featureLevel": 26,
"featureLevel": 28,
"creator": "zap",
"keyValuePairs": [
{
......@@ -3794,21 +3794,27 @@
"endpointTypeIndex": 0,
"profileId": "0x0107",
"endpointId": 41,
"networkId": 1
"networkId": 1,
"endpointVersion": null,
"deviceIdentifier": null
},
{
"endpointTypeName": "Endpoint Type C",
"endpointTypeIndex": 1,
"profileId": "0x0104",
"endpointId": 42,
"networkId": 1
"networkId": 1,
"endpointVersion": null,
"deviceIdentifier": null
},
{
"endpointTypeName": "Endpoint Type B",
"endpointTypeIndex": 2,
"profileId": "0x0104",
"endpointId": 43,
"networkId": 2
"networkId": 2,
"endpointVersion": null,
"deviceIdentifier": null
}
]
}
\ No newline at end of file
{
"featureLevel": 26,
"featureLevel": 28,
"creator": "zap",
"keyValuePairs": [
{
......@@ -1861,21 +1861,27 @@
"endpointTypeIndex": 0,
"profileId": "0x0104",
"endpointId": 1,
"networkId": 1
"networkId": 1,
"endpointVersion": null,
"deviceIdentifier": null
},
{
"endpointTypeName": "Anonymous Endpoint Type",
"endpointTypeIndex": 1,
"profileId": "0x0104",
"endpointId": 2,
"networkId": 1
"networkId": 1,
"endpointVersion": null,
"deviceIdentifier": null
},
{
"endpointTypeName": "Anonymous Endpoint Type",
"endpointTypeIndex": 2,
"profileId": "0x0104",
"endpointId": 7,
"networkId": 1
"networkId": 1,
"endpointVersion": null,
"deviceIdentifier": null
}
]
}
\ No newline at end of file
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册