From 3f9e8e81e658b7b7c7603f747616ae36f5cb3f38 Mon Sep 17 00:00:00 2001 From: Manuel Sabban Date: Wed, 24 Jan 2024 19:51:55 +0100 Subject: [PATCH] fix some bats tests (#2775) --- test/bats/01_cscli.bats | 11 +++++++---- test/bats/04_capi.bats | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/test/bats/01_cscli.bats b/test/bats/01_cscli.bats index dd03ea207..3a5b4aad0 100644 --- a/test/bats/01_cscli.bats +++ b/test/bats/01_cscli.bats @@ -115,15 +115,18 @@ teardown() { assert_output "&false" # complex type - rune -0 cscli config show --key Config.PluginConfig + rune -0 cscli config show --key Config.Prometheus assert_output - <<-EOT - &csconfig.PluginCfg{ - User: "nobody", - Group: "nogroup", + &csconfig.PrometheusCfg{ + Enabled: true, + Level: "full", + ListenAddr: "127.0.0.1", + ListenPort: 6060, } EOT } + @test "cscli - required configuration paths" { config=$(cat "${CONFIG_YAML}") configdir=$(config_get '.config_paths.config_dir') diff --git a/test/bats/04_capi.bats b/test/bats/04_capi.bats index 64da27a56..d5154c1a0 100644 --- a/test/bats/04_capi.bats +++ b/test/bats/04_capi.bats @@ -43,7 +43,7 @@ setup() { config_set 'del(.api.server.online_client)' rune -1 cscli capi status - assert_stderr --partial "no configuration for Central API (CAPI) in '$CONFIG_YAML'" + assert_stderr --regexp "no configuration for Central API \(CAPI\) in '$(echo $CONFIG_YAML|sed s#//#/#g)'" } @test "cscli capi status" {