Documentation
¶
Index ¶
- Constants
- Variables
- func AddMetadataKey(t *testing.T, client *httpClient, key string, comment string, ...) *models.MetadataKey
- func AddMetadataValue(t *testing.T, client *httpClient, keyId int, value *models.MetadataValue, ...) *models.MetadataValue
- func DeleteMetadataKey(t *testing.T, client *httpClient, wantHttpStatus int, keyId int)
- func DeleteTokenFile() error
- func DoAdminLogin(t *testing.T)
- func DoTesterLogin(t *testing.T)
- func DoUserLogin(t *testing.T)
- func EnsureUserLoggedIn(t *testing.T)
- func GetDb() *storage.Database
- func GetMetadataKey(t *testing.T, client *httpClient, keyId int, wantHttpStatus int) *models.MetadataKey
- func GetMetadataKeys(t *testing.T, client *httpClient, wantHttpStatus int, ...) *[]models.MetadataKey
- func LoginRequest(t *testing.T, userName, password string, wantCode int) (string, int)
- func ReadTokenFromFile() error
- func SaveTokenToFile() error
- func UpdateMetadataKey(t *testing.T, client *httpClient, wantHttpStatus int, key *models.MetadataKey)
- type ApiTestSuite
Constants ¶
View Source
const ( UserName = "user" UserPassword = "superstronguser" AdminName = "admin" AdminPassword = "superstrongadmin" TesterName = "tester" TesterPassword = "superstrongtester" )
Variables ¶
View Source
var ( UserToken = "" AdminToken = "" TesterToken = "" )
Functions ¶
func AddMetadataKey ¶
func AddMetadataValue ¶
func AddMetadataValue(t *testing.T, client *httpClient, keyId int, value *models.MetadataValue, wantHttpStatus int) *models.MetadataValue
func DeleteMetadataKey ¶
func DeleteTokenFile ¶
func DeleteTokenFile() error
func DoAdminLogin ¶
func DoTesterLogin ¶ added in v0.6.0
func DoUserLogin ¶
func EnsureUserLoggedIn ¶
func GetMetadataKey ¶
func GetMetadataKeys ¶
func GetMetadataKeys(t *testing.T, client *httpClient, wantHttpStatus int, editFunc func(request *httpRequest) *httpRequest) *[]models.MetadataKey
func LoginRequest ¶
func ReadTokenFromFile ¶
func ReadTokenFromFile() error
func SaveTokenToFile ¶
func SaveTokenToFile() error
func UpdateMetadataKey ¶
func UpdateMetadataKey(t *testing.T, client *httpClient, wantHttpStatus int, key *models.MetadataKey)
Types ¶
type ApiTestSuite ¶
func (*ApiTestSuite) Init ¶
func (suite *ApiTestSuite) Init()
func (*ApiTestSuite) SetupSuite ¶
func (suite *ApiTestSuite) SetupSuite()
func (*ApiTestSuite) SetupTest ¶
func (suite *ApiTestSuite) SetupTest()
func (*ApiTestSuite) TearDownSuite ¶
func (suite *ApiTestSuite) TearDownSuite()
Click to show internal directories.
Click to hide internal directories.