---
apiVersion: v1
kind: ConfigMap
metadata:
  name: flagger-loadtester-bats
data:
  tests: |
    #!/usr/bin/env bats

    @test "check message" {
      curl -sS http://${URL} | jq -r .message | {
        run cut -d $' ' -f1
        [ $output = "greetings" ]
      }
    }

    @test "check headers" {
      curl -sS http://${URL}/headers | grep X-Request-Id
    }
