github.com/koko1123/flow-go-1@v0.29.6/utils/unittest/files.go (about) 1 package unittest 2 3 import ( 4 "os" 5 "testing" 6 7 "github.com/stretchr/testify/require" 8 ) 9 10 func RequireFileEmpty(t *testing.T, path string) { 11 require.FileExists(t, path) 12 13 fi, err := os.Stat(path) 14 require.NoError(t, err) 15 16 size := fi.Size() 17 18 require.Equal(t, int64(0), size) 19 }