suite: test secrets
templates:
  - secrets.yaml
tests:
  - it: should create HF token secret when hfToken is provided
    set:
      hfToken: "hf_test_token_123"
    asserts:
      - hasDocuments:
          count: 1
      - isKind:
          of: Secret
      - equal:
          path: metadata.name
          value: RELEASE-NAME-hf-token
      - exists:
          path: data.token

  - it: should not create any secrets when hfToken is empty and no secrets defined
    set:
      hfToken: ""
      secrets: {}
    asserts:
      - hasDocuments:
          count: 0

  - it: should create both generic and HF token secrets
    set:
      hfToken: "hf_test_token_123"
      secrets:
        mykey: myvalue
    asserts:
      - hasDocuments:
          count: 2

  - it: should create only generic secrets when no hfToken
    set:
      hfToken: ""
      secrets:
        mykey: myvalue
    asserts:
      - hasDocuments:
          count: 1
      - isKind:
          of: Secret
      - equal:
          path: metadata.name
          value: RELEASE-NAME-secrets
