Skip to content

Commit

Permalink
Fixing test cases for parse org users
Browse files Browse the repository at this point in the history
Signed-off-by: Yashvi Jain <Yashvi.jain@progress.com>
  • Loading branch information
Yashvi Jain authored and Yashvi Jain committed Feb 17, 2022
1 parent 213a42a commit 3b3dd9a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/infra-proxy-service/migrations/pipeline/utility.go
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ func ParseOrgUserAssociation(ctx context.Context, st storage.Storage, result pip
}

func getActionForOrgUsers(ctx context.Context, st storage.Storage, result pipeline.Result) ([]pipeline.OrgsUsersAssociations, error) {
orgUserAssociations := make([]pipeline.OrgsUsersAssociations, len(result.ParsedResult.Orgs))
orgUserAssociations := make([]pipeline.OrgsUsersAssociations, 0)
var userAssociations []pipeline.UserAssociation
orgPath := path.Join(result.Meta.UnzipFolder, "organizations")
for _, org := range result.ParsedResult.Orgs {
Expand All @@ -364,7 +364,7 @@ func getActionForOrgUsers(ctx context.Context, st storage.Storage, result pipeli
}

func createInsertUserAssociationFromMemberJson(memberJson pipeline.MemberJson) []pipeline.UserAssociation {
userAssociation := make([]pipeline.UserAssociation, len(memberJson))
userAssociation := make([]pipeline.UserAssociation, 0)
for _, user := range memberJson {
userAssociation = append(userAssociation, pipeline.UserAssociation{Username: user.User.Username, ActionOps: pipeline.Insert})
}
Expand Down

0 comments on commit 3b3dd9a

Please sign in to comment.