suite: headers middleware test
templates:
  - common.yaml
release:
  name: test-release-name
  namespace: test-release-namespace
tests:
  - it: should pass with all set
    set:
      ingressMiddlewares:
        traefik:
          my-middleware1:
            enabled: true
            type: headers
            data:
              customRequestHeaders:
                some-name: some-value
                some-other-name: some-other-value
              customResponseHeaders:
                some-name: some-value
                some-other-name: some-other-value
              accessControlAllowCredentials: true
              accessControlAllowHeaders:
                - some-header
                - some-other-header
              accessControlAllowMethods:
                - GET
                - DELETE
              accessControlAllowOriginList:
                - some-origin
                - some-other-origin
              accessControlAllowOriginListRegex:
                - some-origin-regex
                - some-other-origin-regex
              accessControlExposeHeaders:
                - some-header
                - some-other-header
              accessControlMaxAge: 1000
              addVaryHeader: true
              allowedHosts:
                - some-host
                - some-other-host
              hostsProxyHeaders:
                - some-header
                - some-other-header
              sslProxyHeaders:
                some-header: some-value
                some-other-header: some-other-value
              stsSeconds: 1000
              stsIncludeSubdomains: true
              stsPreload: true
              forceSTSHeader: true
              frameDeny: true
              customFrameOptionsValue: some-value
              contentTypeNosniff: true
              browserXssFilter: true
              customBrowserXSSValue: some-value
              contentSecurityPolicy: some-value
              contentSecurityPolicyReportOnly: true
              publicKey: some-public-key
              referrerPolicy: some-referrer-policy
              permissionsPolicy: some-permissions-policy
              isDevelopment: true
    asserts:
      - documentIndex: &middlewareDoc 0
        isKind:
          of: Middleware
      - documentIndex: *middlewareDoc
        equal:
          path: spec
          value:
            headers:
              customRequestHeaders:
                some-name: some-value
                some-other-name: some-other-value
              customResponseHeaders:
                some-name: some-value
                some-other-name: some-other-value
              accessControlAllowCredentials: true
              accessControlAllowHeaders:
                - some-header
                - some-other-header
              accessControlAllowMethods:
                - GET
                - DELETE
              accessControlAllowOriginList:
                - some-origin
                - some-other-origin
              accessControlAllowOriginListRegex:
                - some-origin-regex
                - some-other-origin-regex
              accessControlExposeHeaders:
                - some-header
                - some-other-header
              accessControlMaxAge: 1000
              addVaryHeader: true
              allowedHosts:
                - some-host
                - some-other-host
              hostsProxyHeaders:
                - some-header
                - some-other-header
              sslProxyHeaders:
                some-header: some-value
                some-other-header: some-other-value
              stsSeconds: 1000
              stsIncludeSubdomains: true
              stsPreload: true
              forceSTSHeader: true
              frameDeny: true
              customFrameOptionsValue: some-value
              contentTypeNosniff: true
              browserXssFilter: true
              customBrowserXSSValue: some-value
              contentSecurityPolicy: some-value
              contentSecurityPolicyReportOnly: true
              publicKey: some-public-key
              referrerPolicy: some-referrer-policy
              permissionsPolicy: some-permissions-policy
              isDevelopment: true
