Skip to content

Commit

Permalink
Try to replace binblob with a different endpoint
Browse files Browse the repository at this point in the history
Signed-off-by: Simone Orru <simone.orru@secomind.com>
  • Loading branch information
sorru94 committed Sep 8, 2023
1 parent 10d5b24 commit 149d9c1
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions e2etest/persistency/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def unset_some_properties(device: DeviceMqtt, test_cfg: TestCfg):

cprint("\nUnset some server owned properties.", color="cyan", flush=True)
for key, _ in test_cfg.mock_data.items():
if key not in ["binaryblob_endpoint", "stringarray_endpoint"]:
if key not in ["longinteger_endpoint", "stringarray_endpoint"]:
delete_server_interface(test_cfg, test_cfg.interface_server_prop, "/sensor-id/" + key)
time.sleep(0.005)

Expand Down Expand Up @@ -142,7 +142,7 @@ def shuffle_database(persistency_dir: Path, test_cfg: TestCfg):
)
cursor.execute(
"DELETE FROM properties WHERE interface=? AND path=?",
(test_cfg.interface_server_prop, "/sensor-id/binaryblob_endpoint"),
(test_cfg.interface_server_prop, "/sensor-id/longinteger_endpoint"),
)
cursor.execute(
"INSERT OR REPLACE INTO properties (interface, major, path, value) VALUES " "(?, ?, ?, ?)",
Expand Down Expand Up @@ -230,7 +230,7 @@ def main(cb_loop: asyncio.AbstractEventLoop, test_cfg: TestCfg):
] + [
(test_cfg.interface_server_prop, 0, f"/sensor-id/{k}", v)
for k, v in test_cfg.mock_data.items()
if k in ["binaryblob_endpoint", "stringarray_endpoint"]
if k in ["longinteger_endpoint", "stringarray_endpoint"]
]
if actual_db != expect_db:
print(f"Expectec database: {expect_db}", flush=True)
Expand All @@ -242,7 +242,7 @@ def main(cb_loop: asyncio.AbstractEventLoop, test_cfg: TestCfg):
"booleanarray_endpoint": test_cfg.mock_data["booleanarray_endpoint"],
},
test_cfg.interface_server_prop: {
"binaryblob_endpoint": test_cfg.mock_data["binaryblob_endpoint"],
"longinteger_endpoint": test_cfg.mock_data["longinteger_endpoint"],
"stringarray_endpoint": test_cfg.mock_data["stringarray_endpoint"],
},
}
Expand Down Expand Up @@ -288,7 +288,7 @@ def main(cb_loop: asyncio.AbstractEventLoop, test_cfg: TestCfg):
"booleanarray_endpoint": test_cfg.mock_data["booleanarray_endpoint"],
},
test_cfg.interface_server_prop: {
"binaryblob_endpoint": test_cfg.mock_data["binaryblob_endpoint"],
"longinteger_endpoint": test_cfg.mock_data["longinteger_endpoint"],
"stringarray_endpoint": test_cfg.mock_data["stringarray_endpoint"],
},
}
Expand All @@ -311,12 +311,12 @@ def main(cb_loop: asyncio.AbstractEventLoop, test_cfg: TestCfg):
"/sensor-id/integer_endpoint",
66,
),
# (
# "org.astarte-platform.python.e2etest.ServerProperty",
# 0,
# "/sensor-id/binaryblob_endpoint",
# "hello",
# ),
(
"org.astarte-platform.python.e2etest.ServerProperty",
0,
"/sensor-id/longinteger_endpoint",
"hello",
),
(
"org.astarte-platform.python.e2etest.ServerProperty",
0,
Expand All @@ -331,7 +331,7 @@ def main(cb_loop: asyncio.AbstractEventLoop, test_cfg: TestCfg):
"booleanarray_endpoint": test_cfg.mock_data["booleanarray_endpoint"],
},
test_cfg.interface_server_prop: {
"binaryblob_endpoint": test_cfg.mock_data["binaryblob_endpoint"],
"longinteger_endpoint": test_cfg.mock_data["longinteger_endpoint"],
"stringarray_endpoint": test_cfg.mock_data["stringarray_endpoint"],
},
}
Expand Down

0 comments on commit 149d9c1

Please sign in to comment.