aboutsummaryrefslogtreecommitdiffstats
path: root/modules/setting/attachment_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/setting/attachment_test.go')
-rw-r--r--modules/setting/attachment_test.go22
1 files changed, 11 insertions, 11 deletions
diff --git a/modules/setting/attachment_test.go b/modules/setting/attachment_test.go
index 3e8d2da4d9..c566dfa60c 100644
--- a/modules/setting/attachment_test.go
+++ b/modules/setting/attachment_test.go
@@ -25,9 +25,9 @@ MINIO_ENDPOINT = my_minio:9000
assert.NoError(t, loadAttachmentFrom(cfg))
assert.EqualValues(t, "minio", Attachment.Storage.Type)
- assert.EqualValues(t, "my_minio:9000", Attachment.Storage.MinioConfig.Endpoint)
- assert.EqualValues(t, "gitea-attachment", Attachment.Storage.MinioConfig.Bucket)
- assert.EqualValues(t, "attachments/", Attachment.Storage.MinioConfig.BasePath)
+ assert.Equal(t, "my_minio:9000", Attachment.Storage.MinioConfig.Endpoint)
+ assert.Equal(t, "gitea-attachment", Attachment.Storage.MinioConfig.Bucket)
+ assert.Equal(t, "attachments/", Attachment.Storage.MinioConfig.BasePath)
}
func Test_getStorageTypeSectionOverridesStorageSection(t *testing.T) {
@@ -47,8 +47,8 @@ MINIO_BUCKET = gitea
assert.NoError(t, loadAttachmentFrom(cfg))
assert.EqualValues(t, "minio", Attachment.Storage.Type)
- assert.EqualValues(t, "gitea-minio", Attachment.Storage.MinioConfig.Bucket)
- assert.EqualValues(t, "attachments/", Attachment.Storage.MinioConfig.BasePath)
+ assert.Equal(t, "gitea-minio", Attachment.Storage.MinioConfig.Bucket)
+ assert.Equal(t, "attachments/", Attachment.Storage.MinioConfig.BasePath)
}
func Test_getStorageSpecificOverridesStorage(t *testing.T) {
@@ -69,8 +69,8 @@ STORAGE_TYPE = local
assert.NoError(t, loadAttachmentFrom(cfg))
assert.EqualValues(t, "minio", Attachment.Storage.Type)
- assert.EqualValues(t, "gitea-attachment", Attachment.Storage.MinioConfig.Bucket)
- assert.EqualValues(t, "attachments/", Attachment.Storage.MinioConfig.BasePath)
+ assert.Equal(t, "gitea-attachment", Attachment.Storage.MinioConfig.Bucket)
+ assert.Equal(t, "attachments/", Attachment.Storage.MinioConfig.BasePath)
}
func Test_getStorageGetDefaults(t *testing.T) {
@@ -80,7 +80,7 @@ func Test_getStorageGetDefaults(t *testing.T) {
assert.NoError(t, loadAttachmentFrom(cfg))
// default storage is local, so bucket is empty
- assert.EqualValues(t, "", Attachment.Storage.MinioConfig.Bucket)
+ assert.Empty(t, Attachment.Storage.MinioConfig.Bucket)
}
func Test_getStorageInheritNameSectionType(t *testing.T) {
@@ -115,7 +115,7 @@ MINIO_SECRET_ACCESS_KEY = correct_key
storage := Attachment.Storage
assert.EqualValues(t, "minio", storage.Type)
- assert.EqualValues(t, "gitea", storage.MinioConfig.Bucket)
+ assert.Equal(t, "gitea", storage.MinioConfig.Bucket)
}
func Test_AttachmentStorage1(t *testing.T) {
@@ -128,6 +128,6 @@ STORAGE_TYPE = minio
assert.NoError(t, loadAttachmentFrom(cfg))
assert.EqualValues(t, "minio", Attachment.Storage.Type)
- assert.EqualValues(t, "gitea", Attachment.Storage.MinioConfig.Bucket)
- assert.EqualValues(t, "attachments/", Attachment.Storage.MinioConfig.BasePath)
+ assert.Equal(t, "gitea", Attachment.Storage.MinioConfig.Bucket)
+ assert.Equal(t, "attachments/", Attachment.Storage.MinioConfig.BasePath)
}