# We have two kinds of configuration
# 1) common one: config.common.yaml
# 2) env specified:
#    * config.dev.yaml, which use for dev env test, makefile target 'e2e-test-dev will use this config.
#    * config.staging.yaml, which use for staging env test, makefile target 'e2e-test-staging will use this config.
#    * config.prod.yaml, which use for prod env test, makefile target 'e2e-test-prod will use this config.
#    * config.local.yaml, which use for local test, makefile target 'e2e-test-local will use this config. Please don't upload this to repository, you can copy this file and set fields as needed.
# When running case
# 1. Most fields in config.{env}.yaml will override fields in config.common.yaml if field in config.{env}.yaml is not empty.
# 2. Fields like tidbClusterIds, cdcDownstreams will merge together instead of overriding.


runAsCI: true
mustCleanup: true
executor: override-me
tidbCloudURL: "https://override_me"
tidbCloudConsoleAPIURL: "https://override_me"
kafka:
- authType: DISABLE
  bootstrapEndpoints: 34.218.43.86:49626
  networkType: NetworkType_Public
  password: ""
  tlsEnabled: false
  user: ""
- authType: SASL_PLAIN
  bootstrapEndpoints: 34.218.43.86:49650
  networkType: NetworkType_Public
  password: yTwdT1ykPcrCNdXmRcqsD83nMzAs7i4a
  tlsEnabled: false
  user: e2e_3heacdft
- authType: DISABLE
  cloudProvider: aws
  dnsRecords:
    usw2-az2: usw2-az2.date-integration.kafka.test
  isCustomDomain: true
  kafkaID: date-integration-test
  networkType: NetworkType_Private_Link
  password: ""
  ports:
  - 49682
  privateLinkServiceName: com.amazonaws.vpce.us-west-2.vpce-svc-0079492dbba5cce76
  region: us-west-2
  rootDomainName: date-integration.kafka.test
  tlsEnabled: false
  user: ""
- authType: SASL_PLAIN
  cloudProvider: aws
  dnsRecords:
    usw2-az2: usw2-az2.date-integration.kafka.test
  isCustomDomain: true
  kafkaID: date-integration-test-sasl
  networkType: NetworkType_Private_Link
  password: yTwdT1ykPcrCNdXmRcqsD83nMzAs7i4a
  ports:
  - 49718
  privateLinkServiceName: com.amazonaws.vpce.us-west-2.vpce-svc-0079492dbba5cce76
  region: us-west-2
  rootDomainName: date-integration.kafka.test
  tlsEnabled: false
  user: e2e_3heacdft
- authType: DISABLE
  cloudProvider: gcp
  dnsRecords:
    all zones: us-west1.date-integration.gcp.kafka.test
  isCustomDomain: true
  kafkaID: date-integration-test-c875e9d88019
  networkType: NetworkType_Private_Link
  password: ""
  ports:
  - 48238
  privateLinkServiceName: projects/data-integration-team-int-8f71/regions/us-west1/serviceAttachments/date-integration-test-c875e9d88019-services
  region: us-west1
  rootDomainName: date-integration.gcp.kafka.test
  tlsEnabled: false
  user: ""
- authType: SASL_PLAIN
  cloudProvider: gcp
  dnsRecords:
    all zones: us-west1.date-integration.gcp.kafka.test
  isCustomDomain: true
  kafkaID: date-integration-test-c875e9d88019-sasl
  networkType: NetworkType_Private_Link
  password: Gzx3D2uesNTC5hYjQtblGs082su1xp8U
  ports:
  - 48274
  privateLinkServiceName: projects/data-integration-team-int-8f71/regions/us-west1/serviceAttachments/date-integration-test-c875e9d88019-services
  region: us-west1
  rootDomainName: date-integration.gcp.kafka.test
  tlsEnabled: false
  user: e2e_fhd9ukv2
- authType: DISABLE
  cloudProvider: azure
  dnsRecords:
    "1": japaneast.date-integration.azure.kafka.test
  isCustomDomain: true
  kafkaID: date-integration-test-0af0ecda743c
  networkType: NetworkType_Private_Link
  password: ""
  ports:
  - 40345
  privateLinkServiceName: date-integration-test-0af0ecda743c-services.6a4dce80-0afe-44b4-a730-04e6c4a7dec2.japaneast.azure.privatelinkservice
  region: japaneast
  rootDomainName: date-integration.azure.kafka.test
  tlsEnabled: false
  user: ""
- authType: SASL_PLAIN
  cloudProvider: azure
  dnsRecords:
    "1": japaneast.date-integration.azure.kafka.test
  isCustomDomain: true
  kafkaID: date-integration-test-0af0ecda743c-sasl
  networkType: NetworkType_Private_Link
  password: So5b4YQ68tzVRnie38u2J4SNdJrVL6n1
  ports:
  - 40381
  privateLinkServiceName: date-integration-test-0af0ecda743c-services.6a4dce80-0afe-44b4-a730-04e6c4a7dec2.japaneast.azure.privatelinkservice
  region: japaneast
  rootDomainName: date-integration.azure.kafka.test
  tlsEnabled: false
  user: e2e_thvm6s2a
- authType: DISABLE
  cloudProvider: alicloud
  dnsRecords:
    ap-southeast-1a: ap-southeast-1.date-integration.alicloud.kafka.test
  isCustomDomain: true
  kafkaID: date-integration-test-e67767108c71
  networkType: NetworkType_Private_Link
  password: ""
  ports:
  - 45572
  privateLinkServiceName: com.aliyuncs.privatelink.ap-southeast-1.epsrv-t4nrjz9f15k9zrcwjju8
  region: ap-southeast-1
  rootDomainName: date-integration.alicloud.kafka.test
  tlsEnabled: false
  user: ""
- authType: SASL_PLAIN
  cloudProvider: alicloud
  dnsRecords:
    ap-southeast-1a: ap-southeast-1.date-integration.alicloud.kafka.test
  isCustomDomain: true
  kafkaID: date-integration-test-e67767108c71-sasl
  networkType: NetworkType_Private_Link
  password: 9QDdLpKpXj8C1VCwDwS7JL4E7ckAM4pX
  ports:
  - 45608
  privateLinkServiceName: com.aliyuncs.privatelink.ap-southeast-1.epsrv-t4nrjz9f15k9zrcwjju8
  region: ap-southeast-1
  rootDomainName: date-integration.alicloud.kafka.test
  tlsEnabled: false
  user: e2e_ejg2jj21

mysql:
- endpoint: 34.218.43.86:49609
  networkType: NetworkType_Public
  password: 7c4NQxx5q37VKhXZAmdt7Vjb9c0Ztk26
  user: e2e_admin
- cloudProvider: aws
  networkType: NetworkType_Private_Link
  password: 7c4NQxx5q37VKhXZAmdt7Vjb9c0Ztk26
  ports:
  - 49609
  privateLinkServiceName: com.amazonaws.vpce.us-west-2.vpce-svc-0079492dbba5cce76
  region: us-west-2
  user: e2e_admin
- cloudProvider: gcp
  networkType: NetworkType_Private_Link
  password: h9vtuxUqP4PVGEvdRSZ9KatBZNBpzeMr
  ports:
  - 48165
  privateLinkServiceName: projects/data-integration-team-int-8f71/regions/us-west1/serviceAttachments/date-integration-test-c875e9d88019-services
  region: us-west1
  user: e2e_admin
- cloudProvider: azure
  networkType: NetworkType_Private_Link
  password: wxtQtboa1Rcb79Izjr1oMnhGO4NAC6JZ
  ports:
  - 40272
  privateLinkServiceName: date-integration-test-0af0ecda743c-services.6a4dce80-0afe-44b4-a730-04e6c4a7dec2.japaneast.azure.privatelinkservice
  region: japaneast
  user: e2e_admin
- cloudProvider: alicloud
  networkType: NetworkType_Private_Link
  password: U2JPYQSRiPMylBHJOCBtBDZglcBgfFJx
  ports:
  - 45499
  privateLinkServiceName: com.aliyuncs.privatelink.ap-southeast-1.epsrv-t4nrjz9f15k9zrcwjju8
  region: ap-southeast-1
  user: e2e_admin

pulsar:
- authType: PULSAR_AUTH_TYPE_TOKEN
  endpoint: 34.218.43.86:49760
  namespace: default
  networkType: NetworkType_Public
  protocol: PULSAR_PROTOCOL_PULSAR
  tenant: public
  token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJlMmUtY2xpZW50In0.aXhqDh7g_ObPXpaeOptD2_2s9JoifnC9z72f6YIDJjg
  topic: date-integration-smoke

s3:
- bucketURI: s3://date-integration-test-6c9801be53fe-118688039167-us-west-2/cdc/
  region: us-west-2
  roleARN: arn:aws:iam::118688039167:role/date-integration-test-6c9801be53fe-s3-access

gcs:
- bucketURI: gs://dit-c875e9d88019-data-integration-team-int-8f71/cdc/
  region: us-west1

azureBlobStorage:
- containerURI: https://dit0af0ecda743c.blob.core.windows.net/cdc/
  region: japaneast
  sasToken: "sv=2022-11-02&ss=b&srt=co&sp=rwdlac&se=2036-01-01T00:00:00Z&st=2026-01-01T00:00:00Z&spr=https&sig=47cEAvY8PJ%2B%2F3Qb7RufwkYQMes5%2B5u3BWRY2w15YAvc%3D"

backupExport:
  aws:
    region: us-west-2
    targetURI: s3://date-integration-test-6c9801be53fe-118688039167-us-west-2/backup-export/
  gcp:
    region: us-west1
    targetURI: gs://dit-c875e9d88019-data-integration-team-int-8f71/backup-export/

essentialExport:
  aws:
    region: us-west-2
    roleARN: arn:aws:iam::118688039167:role/date-integration-test-6c9801be53fe-s3-access
    targetURI: s3://date-integration-test-6c9801be53fe-118688039167-us-west-2/cluster-export/
  # Essential v1 AliCloud export target. Override this in the authorized
  # environment config; no access keys are stored in the repository.
  alicloud:
    region: ap-southeast-1
    endpoint: https://oss-ap-southeast-1.aliyuncs.com
    targetURI: oss://override-essential-v1-backup-export/

schemaRegistry:
  endpoints: http://34.218.43.86:49848
  password: 5zv5lWH86LibNjV5ayjCSA9jiiF9ZU6N
  username: e2e_1x7ebfce

importSampleData:
  azureBlob:
    sasToken: AZURE_SAS_TOKEN_PLACEHOLDER
    sourceURL: https://dit0af0ecda743c.blob.core.windows.net/import/sql/
  gcs:
    sourceURL: gs://tidbcloud-samples-us-west1/
  oss:
    accessKeyID: OSS_ACCESS_KEY_PLACEHOLDER
    accessKeySecret: OSS_SECRET_KEY_PLACEHOLDER
    customCSVFormat:
      delimiter: '"'
      escapeChar: \
      lineTerminator: "\n"
      nullValue: \N
      separator: ;
      skipRows: 1
      splitFile: false
    endpoint: https://oss-ap-southeast-1.aliyuncs.com
    importedDBTable:
      database: test
      table: a
    sourceURL: oss://dit-e67767108c71/import/csv/
  s3:
    roleARN: arn:aws:iam::801626783489:role/import-sample-access
    sourceURL: s3://tidbcloud-sample-data/data-ingestion/

# Import sources for cases that exercise explicit data formats. Like
# importSampleData, this section is split per provider, but each provider holds
# a list of items and every item declares its dataFormat (SQL, CSV, PARQUET,
# AURORA_SNAPSHOT - the backend import file-type enums). Cases for these
# formats run only when selected by name (cases2Run) or through the full
# "all" group; they are intentionally not part of the smoke/weekly groups.
# importedDBTable declares the fixture's target database and tables with their
# expected row counts (expectedRows 0 = only assert at least one row), so cases
# can assert the real imported contents.
importData:
  s3:
  - dataFormat: AURORA_SNAPSHOT
    sourceURL: s3://date-integration-test-6c9801be53fe-118688039167-us-west-2/import/aurora-snapshot/aurora-snap-export-sse-kms-encrypted/
    roleARN: arn:aws:iam::118688039167:role/date-integration-test-6c9801be53fe-s3-access
    importedDBTable:
      database: snap_test
      tables:
      - table: orders
        expectedRows: 1000
      - table: users
        expectedRows: 100
  - dataFormat: PARQUET
    sourceURL: s3://date-integration-test-6c9801be53fe-118688039167-us-west-2/import/parquet-flat/
    roleARN: arn:aws:iam::118688039167:role/date-integration-test-6c9801be53fe-s3-access
    importedDBTable:
      database: snap_test
      tables:
      - table: orders
        expectedRows: 1000
      - table: users
        expectedRows: 100

tidbCloudUser: "" # leave empty
tidbCloudPassword: "" # leave empty

# get token from browser after you login to tidb cloud console, set to your env config
tidbCloudToken: "" # leave empty

# set orgID and projectID in your env config for where the cases will be run
orgID: "" # leave empty
projectID: "" # leave empty

# default regions, override it if you want to run in different region
suitePlanRegions:
  dedicated:
    - cloudProvider: "aws"
      regions: ["us-west-2", "us-east-1"]
    - cloudProvider: "gcp"
      regions: ["us-west1", "us-west2"]
    - cloudProvider: "azure"
      regions: ["japaneast"]
  premium:
    - cloudProvider: "aws"
      regions: ["us-west-2"]
    - cloudProvider: "alicloud"
      regions: ["ap-southeast-1"]
  essential:
    - cloudProvider: "aws"
      regions: ["us-east-1"]
    - cloudProvider: "alicloud"
      regions: ["cn-hongkong"]



# common tidb dedicated cluster, if you need more tidb dedicated cluster, pls add them to your env config, it will merge together finally.
tidbDedicatedClusterIds: []
# common tidb serverless cluster, if you need more tidb serverless cluster, pls add them to your env config, it will merge together finally.
tiDBServerlessClusterIds: []

# common kafka, if you need more kafka, pls add to your env config, it will merge together finally
# run cases by group name; multiple groups are separated by commas, e.g. "smoke,weeklyRegression"
caseGroup2Run: "" # leave empty
# we have all the cases registry in ./internal/case_driver/, list cases you want to run in your env config
# cases2Run and caseGroup2Run can be used together: their cases are combined (union), so both are run
cases2Run: [ ] # leave empty
serverlessRegion: "us-east-1"
