# 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" cluster=default name=default proxy=false readonly=false uri=https://127.0.0.1:9093
level=info msg="Reading silence ACL config file" path=acl.yaml
level=fatal 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
