ci: address return value is not checked (errcheck)

Signed-off-by: Praveen M <m.praveen@ibm.com>
This commit is contained in:
Praveen M 2024-12-20 11:15:55 +05:30
parent 6ccc77d510
commit 2526e583c0
2 changed files with 2 additions and 2 deletions

View File

@ -305,7 +305,7 @@ func (vc *vaultConnection) Destroy() {
tmpFile, ok := vc.vaultConfig[api.EnvVaultCACert] tmpFile, ok := vc.vaultConfig[api.EnvVaultCACert]
if ok { if ok {
// ignore error on failure to remove tmpfile (gosec complains) // ignore error on failure to remove tmpfile (gosec complains)
//nolint:forcetypeassert // ignore error on failure to remove tmpfile //nolint:forcetypeassert,errcheck // ignore error on failure to remove tmpfile
_ = os.Remove(tmpFile.(string)) _ = os.Remove(tmpFile.(string))
} }
} }

View File

@ -119,7 +119,7 @@ func TestInitVaultTokensKMS(t *testing.T) {
// add tenant "bob" // add tenant "bob"
bob := make(map[string]interface{}) bob := make(map[string]interface{})
bob["vaultAddress"] = "https://vault.bob.example.org" bob["vaultAddress"] = "https://vault.bob.example.org"
//nolint:forcetypeassert // as its a test we dont need to check assertion here. //nolint:forcetypeassert,errcheck // as its a test we dont need to check assertion here.
args.Config["tenants"].(map[string]interface{})["bob"] = bob args.Config["tenants"].(map[string]interface{})["bob"] = bob
_, err = initVaultTokensKMS(args) _, err = initVaultTokensKMS(args)