From 687ec64c7d4ca7ad0df94df272fde3ef4465e6ad Mon Sep 17 00:00:00 2001 From: Haakon Ludvig Langeland Ervik <45243236+haakon-e@users.noreply.github.com> Date: Thu, 21 Nov 2024 15:49:23 -0800 Subject: [PATCH] test that entries in default config have "help" and "value" --- test/config.jl | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/test/config.jl b/test/config.jl index b824d307ac..d5384e59a9 100644 --- a/test/config.jl +++ b/test/config.jl @@ -37,3 +37,17 @@ repeated_job_ids = filter(kv -> length(kv[2]) > 1, value_to_keys) file, io = mktemp() config_err = ErrorException("File $(CA.normrelpath(file)) is empty or missing.") @test_throws config_err CA.AtmosConfig(file) + +@testset "Check that entries in `default_config.yml` have `help` and `value` keys" begin + config = CA.load_yaml_file(CA.default_config_file) + missing_help = String[] + missing_value = String[] + for (key, value) in config + !haskey(value, "help") && push!(missing_help, key) + !haskey(value, "value") && push!(missing_value, key) + end + # Every key in the default config should have a `help` and `value` key + # If not, these tests will fail, indicating which keys are missing + @test isempty(missing_help) + @test isempty(missing_value) +end