package drautosync

import (
	"github.com/pingcap/endless/pkg/util"
	"github.com/pingcap/endless/testcase/oltp/oltppkg"
)

func TestSuite(caseParams *oltppkg.CaseParams) {
	util.TestCase("ACID should be consistent when down primary dc and restore backup cluster", "oltp_tiup_dr_autosync_001", func() {
		OLTP_TIUP_DR_AUTOSYNC_001(caseParams)
	})
	util.TestCase("ACID should be consistent when replication mode change back from sync-recover to sync", "oltp_tiup_dr_autosync_002", func() {
		OLTP_TIUP_DR_AUTOSYNC_002(caseParams)
	})
	util.TestCase("ACID should be consistent after recover from network partition beween backup tikv and pd", "oltp_tiup_dr_autosync_003", func() {
		OLTP_TIUP_DR_AUTOSYNC_003(caseParams)
	})
	util.TestCase("ACID should be consistent after recover from backup dc in sync-recover mode", "oltp_tiup_dr_autosync_004", func() {
		OLTP_TIUP_DR_AUTOSYNC_004(caseParams)
	})
	util.TestCase("Everything should works fine when run stability while inject some chaos with data consistency verify", "oltp_tiup_dr_autosync_stability_rel_001", func() {
		OLTP_TIUP_DR_AUTOSYNC_STABILITY_REL_001(caseParams)
	})
	util.TestCase("Everything should works fine when run stability while inject some chaos  with data consistency verify", "oltp_tiup_dr_autosync_stability_rel_002", func() {
		OLTP_TIUP_DR_AUTOSYNC_STABILITY_REL_002(caseParams)
	})
	util.TestCase("Scale out and then run in big cluster", "oltp_tiup_dr_autosync_big_cluster", func() {
		OLTP_TIUP_DR_AUTOSYNC_BIG_CLUSTER(caseParams)
	})
	util.TestCase("Run workload with different network chaos between dc", "oltp_tiup_dr_autosync_perf_001", func() {
		OLTP_TIUP_DR_AUTOSYNC_PERF_001(caseParams)
	})
	util.TestCase("Down backup cluster and scale-out to backup then restore again.", "oltp_tiup_dr_autosync_switch", func() {
		OLTP_TIUP_DR_AUTOSYNC_SWITCH(caseParams)
	})

}
