Skip to content

Commit

Permalink
Upd: In test mode create default policy with id 1
Browse files Browse the repository at this point in the history
Signed-off-by: George J Padayatti <george.padayatti@igrant.io>
  • Loading branch information
georgepadayatti committed Dec 15, 2023
1 parent b696cb9 commit 19e2047
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion internal/tenant/single.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,12 @@ func deleteAllPolicies() {
func createDefaultPolicy(config *config.Configuration, org org.Organization, orgAdminId string) (policy.Policy, error) {

var newPolicy policy.Policy
newPolicy.Id = primitive.NewObjectID().Hex()
if config.TestMode {
newPolicy.Id = "1"
} else {
newPolicy.Id = primitive.NewObjectID().Hex()
}

newPolicy.Name = config.Policy.Name
newPolicy.Url = org.PolicyURL
newPolicy.Jurisdiction = org.Location
Expand Down

0 comments on commit 19e2047

Please sign in to comment.