refactor config module

This commit is contained in:
Travis Shears 2026-03-24 11:50:04 +01:00
parent 113384b6ce
commit 86e40f90a1
Signed by: travisshears
GPG key ID: CB9BF1910F3F7469
5 changed files with 60 additions and 76 deletions

View file

@ -1,4 +1,5 @@
import config
import envoy
import gleeunit
import gleeunit/should
@ -8,7 +9,8 @@ pub fn main() -> Nil {
// gleeunit test functions end in `_test`
pub fn file_read_test() {
let assert Ok(cfg) = config.load_config()
envoy.set("MQTT_PW", "TEST")
let cfg = config.load_config()
cfg.mqtt_host
|> should.equal("192.168.1.11")

View file

@ -6,7 +6,6 @@ pub fn main() -> Nil {
gleeunit.main()
}
// gleeunit test functions end in `_test`
pub fn file_read_test() {
let reading =
sensors.sensor_name(sensors.Temperature)