示例#1
0
文件: nqm_test.go 项目: donh/query
func (s *TestNqmSuite) SetUpTest(c *C) {
	switch c.TestName() {
	case "TestNqmSuite.TestToNqmDsl":
		if !qtest.HasDefaultOrmOnPortal(c) {
			return
		}
	}
}
示例#2
0
文件: rdb_test.go 项目: donh/query
func (s *TestNqmRdbSuite) SetUpTest(c *C) {
	if !qtest.HasDefaultOrmOnPortal(c) {
		return
	}

	switch c.TestName() {
	case "TestNqmRdbSuite.TestGetTargetByHost",
		"TestNqmRdbSuite.TestGetTargetById":
		qtest.ExecuteQueriesOrFailInTx(
			`
			INSERT INTO nqm_target(tg_id, tg_name, tg_host) VALUES
			(19201, 'target-1', '100.20.50.1'),
			(19202, 'target-2', '100.20.50.2'),
			(19203, 'target-3', '100.20.50.3')
			`,
		)
	}
}