From 4bbc5322464363f0f8c84f2cb0064951c413e67d Mon Sep 17 00:00:00 2001 From: Shahzad Lone Date: Sun, 20 Oct 2024 22:11:53 +0400 Subject: [PATCH] PR(FIX): Refactor AddPolicy --- tests/integration/acp.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/integration/acp.go b/tests/integration/acp.go index d98fe08a3f..cade406a14 100644 --- a/tests/integration/acp.go +++ b/tests/integration/acp.go @@ -112,8 +112,10 @@ func addPolicyACP( require.Fail(s.t, "Expected error should not have an expected policyID with it.", s.testCase.Description) } - for i, node := range getNodes(action.NodeID, s.nodes) { - identity := getIdentity(s, i, action.Identity) + nodeIDs, nodes := getNodesWithIDs(action.NodeID, s.nodes) + for index, node := range nodes { + nodeID := nodeIDs[index] + identity := getIdentity(s, nodeID, action.Identity) ctx := db.SetContextIdentity(s.ctx, identity) policyResult, err := node.AddPolicy(ctx, action.Policy)