# Raises an error if --authorization.acl points to a file that contains unknown keys
! exec karma --check-config
! 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=default cluster=default uri=https://127.0.0.1:9093 proxy=false readonly=false
level=INFO msg="Reading silence ACL config file" path=acl.yaml
level=ERROR msg="Execution failed" error="failed to parse silence ACL configuration file \"acl.yaml\": yaml: unmarshal errors:\n  line 6: field nameFoo not found in type config.SilenceFilters"
-- karma.yaml --
authentication:
  header:
    name: "X-User"
    value_re: "(.+)"
authorization:
  groups:
    - name: admins
      members:
        - alice
        - bob
    - name: users
      members:
        - john
  acl:
    silences: acl.yaml
alertmanager:
  servers:
    - name: default
      uri: https://127.0.0.1:9093

-- acl.yaml --
rules:
  - action: block
    reason: prod cluster cannot be silenced
    scope:
      filters:
        - nameFoo: cluster
          value: prod
