feat(objectstorage): Min/Max acceptance tests (#850)

Signed-off-by: Alexander Dahmen <alexander.dahmen@inovex.de>
This commit is contained in:
Alexander Dahmen 2025-05-20 13:55:49 +02:00 committed by GitHub
parent a2cd8a0200
commit f572b5c386
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
18 changed files with 192 additions and 135 deletions

View file

@ -27,6 +27,8 @@ func (c *objectStorageClientMocked) EnableServiceExecute(_ context.Context, proj
}
func TestMapFields(t *testing.T) {
const testRegion = "eu01"
id := fmt.Sprintf("%s,%s,%s", "pid", testRegion, "bname")
tests := []struct {
description string
input *objectstorage.GetBucketResponse
@ -39,7 +41,7 @@ func TestMapFields(t *testing.T) {
Bucket: &objectstorage.Bucket{},
},
Model{
Id: types.StringValue("pid,bname"),
Id: types.StringValue(id),
Name: types.StringValue("bname"),
ProjectId: types.StringValue("pid"),
URLPathStyle: types.StringNull(),
@ -57,7 +59,7 @@ func TestMapFields(t *testing.T) {
},
},
Model{
Id: types.StringValue("pid,bname"),
Id: types.StringValue(id),
Name: types.StringValue("bname"),
ProjectId: types.StringValue("pid"),
URLPathStyle: types.StringValue("url/path/style"),
@ -75,7 +77,7 @@ func TestMapFields(t *testing.T) {
},
},
Model{
Id: types.StringValue("pid,bname"),
Id: types.StringValue(id),
Name: types.StringValue("bname"),
ProjectId: types.StringValue("pid"),
URLPathStyle: types.StringValue(""),