apiVersion: api/v1
kind: Case
name: dm_migrate_incremental_ddl
features: [dm]
summary: 测试DML增量数据同步
steps: |
    1. 使用dmctl operate create source.yaml添加source
    2. 使用dmctl task-start task.yaml 创建任务
    3. 等待1min，等数据同步完之后进行一致性比对
    4. 使用负载对上游数据库加载create index
    5. 检查数据一致性
expectedResult: |
    步骤1. 创建source成功
    步骤2. 创建任务成功
    步骤3. sync diff 对比数据一致
    步骤4. 使用dmctl query-status task-name查看任务
    步骤5. 上下游数据对比一致
priority: P1
supportedVersions: [">=5.3.0"]
tags: ["dm"]
designer: xujianxu@pingcap.com
automation: AUTOMATED
active: true
framework:
    generic:
        command:
            [
                "/bin/sh",
                "-c",
                "/dm_test_infra --workload testcases/dm_migrate_incremental_ddl/workload.yaml --path testcases/dm_migrate_incremental_ddl/path.yaml",
            ]
        workingDir: "/"
        env: null
        image: hub-new.pingcap.net/dm/test-infra:dm_migrate_incremental_ddl
        imagePullPolicy: Always
parameters:
    - type: RESOURCE
      name: upstream1
      default: upstream1
    - type: RESOURCE
      name: downstream
      default: downstream
    - type: RESOURCE
      name: dm
      default: dm
    - type: RESOURCE
      name: workload
      default: workload
    - type: RESOURCE
      name: syncdiff
      default: syncdiff
    - type: STRING
      name: ddlStatement
      default: |
          'create index idx0 on test.usertable (FIELD0);'
