Skip to content

Commit

Permalink
test: rename waitForTracingPolicy to ensureTracingPolicy
Browse files Browse the repository at this point in the history
Renamed waitForTracingPolicy to ensureTracingPolicy because that is what it does and the waiting part is done by WaitForTracingPolicy so we could import ensureTracingPolicy to other packages in future without confusions

Signed-off-by: sadath-12 <sadathsadu2002@gmail.com>
  • Loading branch information
sadath-12 committed Jan 4, 2024
1 parent a250225 commit 69e1d24
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/e2e/helpers/grpc/grpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func WaitForTracingPolicy(ctx context.Context, policyName string) error {
client := tetragon.NewFineGuidanceSensorsClient(conn)

for i := 0; i < maxTries; i++ {
err = waitForTracingPolicy(ctx, policyName, client)
err = ensureTracingPolicy(ctx, policyName, client)
if err == nil {
break
}
Expand All @@ -57,7 +57,7 @@ func WaitForTracingPolicy(ctx context.Context, policyName string) error {
return nil
}

func waitForTracingPolicy(ctx context.Context, policyName string, client tetragon.FineGuidanceSensorsClient) error {
func ensureTracingPolicy(ctx context.Context, policyName string, client tetragon.FineGuidanceSensorsClient) error {
res, err := client.ListTracingPolicies(ctx, &tetragon.ListTracingPoliciesRequest{})
if err != nil {
return err
Expand Down

0 comments on commit 69e1d24

Please sign in to comment.