Example #1
0
func (s *TestNqmSuite) SetUpTest(c *C) {
	switch c.TestName() {
	case "TestNqmSuite.TestToNqmDsl":
		if !qtest.HasDefaultOrmOnPortal(c) {
			return
		}
	}
}
Example #2
0
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')
			`,
		)
	}
}