Various unit test related improvements (#9865)

* api4: improved error handling

* system_store: more logs

* integrate go-junit-report into test-te/test-ee

* add CI_MINIO_HOST and CI_INBUCKET_HOST instead of CI_HOST

* comment re: minio configuration issue

* fix TestStartServerPortUnavailable to pass even when root can bind to :21

* skip TestFindManifest_FolderPermission while running as root
Этот коммит содержится в:
Jesse Hallam
2018-11-28 09:05:39 -05:00
коммит произвёл GitHub
родитель c24c518a14
Коммит 136d8ca5c4
9 изменённых файлов: 63 добавлений и 27 удалений

Просмотреть файл

@@ -430,7 +430,7 @@ func TestEmailTest(t *testing.T) {
CheckErrorMessage(t, resp, "api.admin.test_email.missing_server")
CheckBadRequestStatus(t, resp)
inbucket_host := os.Getenv("CI_HOST")
inbucket_host := os.Getenv("CI_INBUCKET_HOST")
if inbucket_host == "" {
inbucket_host = "dockerhost"
}
@@ -665,7 +665,7 @@ func TestS3TestConnection(t *testing.T) {
defer th.TearDown()
Client := th.Client
s3Host := os.Getenv("CI_HOST")
s3Host := os.Getenv("CI_MINIO_HOST")
if s3Host == "" {
s3Host = "dockerhost"
}
@@ -696,6 +696,8 @@ func TestS3TestConnection(t *testing.T) {
t.Fatal("should return error - missing s3 bucket")
}
// If this fails, check the test configuration to ensure minio is setup with the
// `mattermost-test` bucket defined by model.MINIO_BUCKET.
config.FileSettings.AmazonS3Bucket = model.MINIO_BUCKET
config.FileSettings.AmazonS3Region = "us-east-1"
_, resp = th.SystemAdminClient.TestS3Connection(&config)