package ops

import (
	"testing"

	"github.com/tidbcloud/qa-gourd/ProductService"
)

type OpsTestBase struct {
	W    *ProductService.WebRequestInfo
	T    *testing.T
	Urls map[string]ProductService.UrlInfo

	API *client
}

func (b *OpsTestBase) Init(w *ProductService.WebRequestInfo, urls map[string]ProductService.UrlInfo) {
	b.W = w
	b.T = w.T
	b.Urls = urls

	b.API = &client{
		w:    w,
		urls: urls,
	}
}

// MagicReason return a reason indicating it is a automated test
// and don't need to be approved by a human.
func (b *OpsTestBase) MagicReason() string {
	return "automated test"
}
