2022-11-03 16:58:48 +00:00
|
|
|
{.used.}
|
|
|
|
|
2024-03-15 23:08:47 +00:00
|
|
|
import testutils/unittests
|
|
|
|
import ../../waku/common/envvar_serialization/utils
|
2022-11-03 16:58:48 +00:00
|
|
|
|
|
|
|
suite "nim-envvar-serialization - utils":
|
|
|
|
test "construct env var key":
|
|
|
|
## Given
|
|
|
|
let prefix = "some-prefix"
|
|
|
|
let name = @["db-url"]
|
2024-03-15 23:08:47 +00:00
|
|
|
|
2022-11-03 16:58:48 +00:00
|
|
|
## When
|
|
|
|
let key = constructKey(prefix, name)
|
|
|
|
|
|
|
|
## Then
|
|
|
|
check:
|
2024-03-15 23:08:47 +00:00
|
|
|
key == "SOME_PREFIX_DB_URL"
|