# Copyright (c) 2024 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

suite: "Splitwell values"
templates:
  - splitwell.yaml
release:
  # Set for testing labels
  name: splitwell
chart:
  # Override for testing labels
  version: 0.1.1
  appVersion: 0.1.0
tests:
  - it: "sets the splitwell DAR version"
    set:
      # Things we need just to pass the schema
      persistence:
        host: mock-pg-host
        schema: splitwell
      auth:
        jwksUrl: "https://mock.com/.well-known/jwks.json"
        targetAudience: "mock_audience"
      maxDarVersion: 1.0.0
    documentSelector:
      path: kind
      value: Deployment
    asserts:
      # Sanity check
      - equal:
          path: spec.template.spec.containers[0].name
          value: splitwell-app
      - contains:
          path: spec.template.spec.containers[0].env
          content:
            name: ADDITIONAL_CONFIG_MAX_DAR_VERSION
            value: canton.splitwell-apps.splitwell_backend.required-dar-version = "1.0.0"
