Skip to content

Commit

Permalink
Merge pull request #3 from SchwarzIT/update-codeowners-file
Browse files Browse the repository at this point in the history
update code owners for object storage + use caps for ID and URN
  • Loading branch information
do87 authored Sep 22, 2022
2 parents e731a7b + 61c9d73 commit cfdbd9e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
pkg/api/v1/costs/* @troublete

# Object Storage Credentials group
client/pkg/api/v1/object-storage/credentials-group/* [email protected] [email protected]
client/pkg/api/v1/object-storage/credentials-group/* @johannes-riecken @SkyFox277
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ type CredentialsGroupDeleteResponse struct {

// CredentialsGroup holds all the credentialsGroup information
type CredentialsGroup struct {
CredentialsGroupId string `json:"credentialsGroupId"`
Urn string `json:"urn"`
CredentialsGroupID string `json:"credentialsGroupId"`
URN string `json:"urn"`
DisplayName string `json:"displayName"`
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
credentialsgroup "github.com/SchwarzIT/community-stackit-go-client/pkg/api/v1/object-storage/credentials-group"
"golang.org/x/exp/slices"

"github.com/SchwarzIT/community-stackit-go-client"
client "github.com/SchwarzIT/community-stackit-go-client"
objectstorage "github.com/SchwarzIT/community-stackit-go-client/pkg/api/v1/object-storage"
"github.com/SchwarzIT/community-stackit-go-client/pkg/consts"
)
Expand Down Expand Up @@ -140,7 +140,7 @@ func TestAccProjectsService_Delete(t *testing.T) {
if i == -1 {
t.Fatalf("credentials group %s not found", tt.args.displayName)
}
credentialsGroupId := resp.CredentialsGroups[i].CredentialsGroupId
credentialsGroupId := resp.CredentialsGroups[i].CredentialsGroupID
err = s.Delete(tt.args.ctx, tt.args.projectID, credentialsGroupId)
if (err != nil) != tt.wantErr {
t.Errorf("ObjectStorageCredentialsGroupService.List() error = %v, wantErr %v", err, tt.wantErr)
Expand All @@ -156,11 +156,11 @@ func TestObjectStorageCredentialsGroupsService_List(t *testing.T) {
s := objectstorage.New(c).CredentialsGroup

projectID := "5dae0612-f5b1-4615-b7ca-b18796aa7e78"
credentialsGroupName := "my-credentialsGroup"
credentialsGroupID := "1dae0334-df56-u6q7-e7fb-g58763a47wa3"
want := credentialsgroup.CredentialsGroupResponse{
Project: projectID,
CredentialsGroups: []credentialsgroup.CredentialsGroup{
{CredentialsGroupId: credentialsGroupName},
{CredentialsGroupID: credentialsGroupID},
},
}
ctx, cancel := context.WithCancel(context.TODO())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ func TestValidateCredentialsGroupID(t *testing.T) {
wantErr bool
}{
{"all ok", "3969597f-d2f3-4c07-8533-1a4bf8159c0e", false},
{"empty", "", true},
{"err", "123", true},
}
for _, tt := range tests {
Expand Down

0 comments on commit cfdbd9e

Please sign in to comment.