MCPcopy Create free account
hub / github.com/couchbase/sync_gateway / deleteTempFile

Function deleteTempFile

rest/config_test.go:1419–1424  ·  view source on GitHub ↗

deleteTempFile deletes the given file.

(t *testing.T, file *os.File)

Source from the content-addressed store, hash-verified

1417
1418// deleteTempFile deletes the given file.
1419func deleteTempFile(t *testing.T, file *os.File) {
1420 path := file.Name()
1421 require.NoError(t, file.Close(), "Error closing file: %s ", path)
1422 require.NoError(t, os.Remove(path), "Error removing file: %s ", path)
1423 require.False(t, base.FileExists(path), "Deleted file %s shouldn't exist", path)
1424}
1425
1426func TestDefaultLogging(t *testing.T) {
1427 base.ResetGlobalTestLogging(t)

Callers 1

TestSetupAndValidateFunction · 0.85

Calls 4

FileExistsFunction · 0.92
NameMethod · 0.65
CloseMethod · 0.65
RemoveMethod · 0.65

Tested by

no test coverage detected