Skip to content

Commit

Permalink
lint: add error checking of write for test case
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter Van Bouwel committed Dec 17, 2024
1 parent fd4b2b6 commit b86d429
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmd/policy-retrieval_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,8 @@ func createTestPolicyFileForLocalPolicyRetriever(policyArn, policyContent string
f, err := os.Create(policyFileName)
checkErrorTestDependency(err, t, fmt.Sprintf("Could Not create policy file %s", policyFileName))

f.Write([]byte(policyContent))
_, err = f.Write([]byte(policyContent))
checkErrorTestDependency(err, t, fmt.Sprintf("Could not write policy content while creating test policy %s: %s", policyArn, policyContent))

defer f.Close()
}
Expand Down

0 comments on commit b86d429

Please sign in to comment.