# Raises an error if we have 2 instances with the same name
! exec karma --config.file=karma.yaml
! stdout .
cmp stderr stderr.txt

-- stderr.txt --
level=INFO msg="Reading configuration file" path=karma.yaml
level=INFO msg="Version: dev"
level=INFO msg="Configured Alertmanager source" name=am1 cluster=am1 uri=https://127.0.0.1:9093 proxy=false readonly=false
level=ERROR msg="Execution failed" error="failed to register Alertmanager 'am1' with URI 'https://127.0.0.1:9094': alertmanager upstream 'am1' already exist"
-- karma.yaml --
alertmanager:
  servers:
    - name: am1
      uri: https://127.0.0.1:9093
    - name: am1
      uri: https://127.0.0.1:9094
