Documentation ¶
Index ¶
- Constants
- Variables
- func BuildCreatePermissionGroupIn() *model.CreatePermissionGroupIn
- func RamdomDateStringInPass() *string
- func RandomEmail() *string
- func RandomString(n int) *string
- func RandomURL() *string
- type Suite
- func (s *Suite) AddHeaderAuthAdmin() client.Option
- func (s *Suite) CreatePermissionGroup(input *model.CreatePermissionGroupIn) (generated.CreatePermissionGroup, error)
- func (s *Suite) Login(email, password string) (generated.Login, error)
- func (s *Suite) LoginWithInitUser() generated.Login
- func (s *Suite) Setup()
Constants ¶
View Source
const ( // Authorization name Authorization = "Authorization" // BearPrefix name BearPrefix = "Bearer " // DomainName name DomainName = "test.com" // ID name ID = "id" // Input name Input = "input" )
Variables ¶
View Source
var InitUser generated.Login
InitUser login with Init User then reuse its token to test other testcases
Functions ¶
func BuildCreatePermissionGroupIn ¶
func BuildCreatePermissionGroupIn() *model.CreatePermissionGroupIn
BuildCreatePermissionGroupIn to be reused
func RamdomDateStringInPass ¶
func RamdomDateStringInPass() *string
RamdomDateStringInPass create a random date in the pass to fake birthday...
func RandomString ¶
RandomString create a random string with desired length
Types ¶
type Suite ¶
Suite utils
func (*Suite) AddHeaderAuthAdmin ¶
AddHeaderAuthAdmin add admin authorization header
func (*Suite) CreatePermissionGroup ¶
func (s *Suite) CreatePermissionGroup(input *model.CreatePermissionGroupIn) (generated.CreatePermissionGroup, error)
CreatePermissionGroup create permission group
func (*Suite) LoginWithInitUser ¶
LoginWithInitUser use Init User (is configured in the internal/config/config.yaml) that has full permissions to login then keep the response in the global variable to help other testcases, for example use the token to authorize the POST request in other testcases
Click to show internal directories.
Click to hide internal directories.