Closed mniestroj closed 1 year ago
Visit the preview URL for this PR (updated for commit 4cab41e):
https://golioth-zephyr-sdk-doxygen-dev--pr273-tests-lightdb-glwuyo8h.web.app
(expires Fri, 14 Oct 2022 23:42:40 GMT)
🔥 via Firebase Hosting GitHub Action 🌎
Add tests that verify successful retrievement of LightDB values. For simplicity just string values were used, so that there is no reordering issue of keys within a structure (server can decide to return structures with keys being ordered differently than what was set using
goliothctl
).When application runs, it expects specific values at specific LightDB paths. Those values are compared with values embedded as C arrays and generated from
resources/
directory. In order to make this test work properly, those values can be automatically set usingscripts/golioth-setup.sh
script, which usesgoliothctl
underneath.The general idea is to run this test application from within Zephyr's twister tool. In order to make it work, credentials and server information (if self-hosted server is used) need to be provided to build process. This is achieved by Kconfig project-specific default values, which are fetched from environment variables if they exist.
At this point only
qemu_x86
platform was tested when building and running standalone, as well as from within twister. However, other platforms might be supported as well, if network_setup() function (in main.c) would be expanded to setup network.TODO: