Fixed the FileShouldBeLocked test for CI
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed

This commit is contained in:
Gregory Ballantine 2022-09-02 01:57:05 -04:00
parent af65a9a92f
commit 92d03f44dd

View File

@ -42,9 +42,10 @@ func (s *FileTestSuite) TestFileShouldBeLocked() {
if err != nil { if err != nil {
s.T().Logf("Unable to open file %s: %s", "testfile-locked.txt", err) s.T().Logf("Unable to open file %s: %s", "testfile-locked.txt", err)
} }
defer file.Close()
assert.True(s.T(), IsFileLocked("testfile-locked.txt")) assert.True(s.T(), IsFileLocked("testfile-locked.txt"))
file.Close()
} }
// test that IsFileLocked returns false when the file is not active // test that IsFileLocked returns false when the file is not active