restapitest

package
v1.2.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 26, 2023 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Echo added in v1.2.0

Types

type Caller added in v1.2.0

type Caller func(apps.AppID, apps.CallRequest) *apps.CallResponse

type Helper

type Helper struct {
	*testing.T
	ServerTestHelper *api4.TestHelper

	LastInstalledBotUser *model.User
	LastInstalledApp     *apps.App

	UserClientPP        *appclient.ClientPP
	User2ClientPP       *appclient.ClientPP
	SystemAdminClientPP *appclient.ClientPP
	LocalClientPP       *appclient.ClientPP
	// contains filtered or unexported fields
}

func NewHelper

func NewHelper(t *testing.T, apps ...*goapp.App) *Helper

func (*Helper) AdminCall

func (th *Helper) AdminCall(appID apps.AppID, creq apps.CallRequest) (*apps.CallResponse, *model.Response, error)

func (*Helper) Call

func (th *Helper) Call(appID apps.AppID, creq apps.CallRequest) (*apps.CallResponse, *model.Response, error)

func (*Helper) CallWithAppMetadata added in v1.2.0

func (th *Helper) CallWithAppMetadata(appID apps.AppID, creq apps.CallRequest) (*httpin.CallResponse, *model.Response, error)

func (*Helper) CleanRun added in v1.2.0

func (th *Helper) CleanRun(name string, f func(th *Helper)) bool

func (*Helper) CreateLocalClient

func (th *Helper) CreateLocalClient(socketPath string) *appclient.ClientPP

func (*Helper) CreateUnauthenticatedClientPP

func (th *Helper) CreateUnauthenticatedClientPP() *appclient.ClientPP

func (*Helper) DisableApp added in v1.2.0

func (th *Helper) DisableApp(app *goapp.App)

func (*Helper) EnableApp added in v1.2.0

func (th *Helper) EnableApp(app *goapp.App)

func (*Helper) HappyAdminCall

func (th *Helper) HappyAdminCall(appID apps.AppID, creq apps.CallRequest) *apps.CallResponse

func (*Helper) HappyCall

func (th *Helper) HappyCall(appID apps.AppID, creq apps.CallRequest) *apps.CallResponse

func (*Helper) HappyUser2Call

func (th *Helper) HappyUser2Call(appID apps.AppID, creq apps.CallRequest) *apps.CallResponse

func (*Helper) InitClients

func (th *Helper) InitClients()

func (*Helper) InstallApp

func (th *Helper) InstallApp(app *goapp.App) *apps.App

func (*Helper) InstallAppWithCleanup added in v1.2.0

func (th *Helper) InstallAppWithCleanup(app *goapp.App)

func (*Helper) InstallAppsPlugin

func (th *Helper) InstallAppsPlugin()

func (*Helper) Run

func (th *Helper) Run(name string, f func(th *Helper)) bool

func (*Helper) TearDown

func (th *Helper) TearDown()

func (*Helper) UninstallApp added in v1.2.0

func (th *Helper) UninstallApp(appID apps.AppID)

func (*Helper) User2Call

func (th *Helper) User2Call(appID apps.AppID, creq apps.CallRequest) (*apps.CallResponse, *model.Response, error)

type TestClientPP

type TestClientPP struct {
	*appclient.ClientPP
	UserID string
}

type TestFunc added in v1.2.0

type TestFunc func(*Helper)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL