Skip to content

Commit b86d429

Browse files
author
Peter Van Bouwel
committed
lint: add error checking of write for test case
1 parent fd4b2b6 commit b86d429

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cmd/policy-retrieval_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,8 @@ func createTestPolicyFileForLocalPolicyRetriever(policyArn, policyContent string
185185
f, err := os.Create(policyFileName)
186186
checkErrorTestDependency(err, t, fmt.Sprintf("Could Not create policy file %s", policyFileName))
187187

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

190191
defer f.Close()
191192
}

0 commit comments

Comments
 (0)