# Loads config file from flags when CONFIG_FILE env is also set
env CONFIG_FILE=env.yaml
exec karma --check-config --config.file=flag.yaml
! stdout .
cmp stderr stderr.txt

-- stderr.txt --
level=INFO msg="Reading configuration file" path=flag.yaml
level=INFO msg="Version: dev"
level=INFO msg="Configured Alertmanager source" name=flag cluster=flag uri=http://127.0.0.1:8080 proxy=false readonly=false
level=INFO msg="Configuration is valid"
-- flag.yaml --
alertmanager:
  servers:
    - name: flag
      uri: "http://127.0.0.1:8080"

-- env.yaml --
alertmanager:
  servers:
    - name: env
      uri: "http://127.0.0.1:8080"

-- karma.yaml --
alertmanager:
  servers:
    - name: karma
      uri: "http://127.0.0.1:8080"
