Documentation ¶
Index ¶
- func CheckMongoActive(t *testing.T)
- func CreateSdk() *v2_gots_sdk.ApiSdk
- func GetBaseTestAsset(elem ...string) string
- func GetDb() *gorm.DB
- func GetTokopediaApiClient() (*api.TokopediaApi, func())
- func NewMongoDatabase(ctx context.Context, dburi string, dbname string) *mongo.Database
- func RunWebSdk(t *testing.T, handler RunHandler)
- type ConfigTest
- type RunHandler
- type Scenario
- func (scen *Scenario) Path(data ...string) string
- func (scen *Scenario) WithBase(handler func(dirbase string, scen *Scenario))
- func (scen *Scenario) WithCopySqliteDatabase(handler func(db *gorm.DB))
- func (scen *Scenario) WithMongoDatabase(cfg *config.UploadBaseConfig, handler func(mongodb *mongo.Database))
- func (scen *Scenario) WithSqliteDatabase(handler func(db *gorm.DB))
- func (scen *Scenario) WithUploadConfig(cfgmodifier func(cfg *config.UploadBaseConfig) error, ...)
- type SendRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckMongoActive ¶
func CreateSdk ¶ added in v1.0.1
func CreateSdk() *v2_gots_sdk.ApiSdk
func GetBaseTestAsset ¶
func GetTokopediaApiClient ¶
func GetTokopediaApiClient() (*api.TokopediaApi, func())
func NewMongoDatabase ¶ added in v1.0.2
func RunWebSdk ¶ added in v1.0.1
func RunWebSdk(t *testing.T, handler RunHandler)
Types ¶
type ConfigTest ¶
type ConfigTest struct {
MongoUri string `json:"mongo_uri"`
}
var CfgTest *ConfigTest
func CheckConfig ¶
func CheckConfig(t *testing.T) *ConfigTest
func (*ConfigTest) GetHostPort ¶
func (cfg *ConfigTest) GetHostPort() (string, string)
type RunHandler ¶ added in v1.0.1
type RunHandler func(sdk *v2_gots_sdk.ApiSdk, sendApi SendRequest) error
type Scenario ¶ added in v1.0.2
type Scenario struct { Base string // contains filtered or unexported fields }
func NewScenario ¶ added in v1.0.2
func (*Scenario) WithCopySqliteDatabase ¶ added in v1.0.2
func (*Scenario) WithMongoDatabase ¶ added in v1.0.2
func (scen *Scenario) WithMongoDatabase(cfg *config.UploadBaseConfig, handler func(mongodb *mongo.Database))
func (*Scenario) WithSqliteDatabase ¶ added in v1.0.2
func (*Scenario) WithUploadConfig ¶ added in v1.0.2
func (scen *Scenario) WithUploadConfig(cfgmodifier func(cfg *config.UploadBaseConfig) error, handler func(cfg *config.UploadBaseConfig))
type SendRequest ¶ added in v1.0.1
type SendRequest func(req *v2_gots_sdk.Api) *httptest.ResponseRecorder
Click to show internal directories.
Click to hide internal directories.