refactor config module
This commit is contained in:
parent
113384b6ce
commit
86e40f90a1
5 changed files with 60 additions and 76 deletions
|
|
@ -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")
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue