Skip to content

Commit

Permalink
Fix TestWorkspaceNestedArchive flake
Browse files Browse the repository at this point in the history
  • Loading branch information
emcfarlane committed Oct 3, 2024
1 parent e065fbb commit 077a4f2
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions private/buf/cmd/buf/workspace_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import (
"github.com/bufbuild/buf/private/pkg/osext"
"github.com/bufbuild/buf/private/pkg/protoencoding"
"github.com/bufbuild/buf/private/pkg/slicesext"
"github.com/bufbuild/buf/private/pkg/storage"
"github.com/bufbuild/buf/private/pkg/storage/storagearchive"
"github.com/bufbuild/buf/private/pkg/storage/storageos"
"github.com/stretchr/testify/require"
Expand Down Expand Up @@ -1686,19 +1687,12 @@ func createZipFromDir(t *testing.T, rootPath string, archiveName string) string
storageos.ReadWriteBucketWithSymlinksIfSupported(),
)
require.NoError(t, err)

zipCloser, err := zipBucket.Put(
require.NoError(t, storage.PutPath(
context.Background(),
zipBucket,
archiveName,
)
require.NoError(t, err)
t.Cleanup(
func() {
require.NoError(t, zipCloser.Close())
},
)
_, err = zipCloser.Write(buffer.Bytes())
require.NoError(t, err)
buffer.Bytes(),
))
return zipDir
}

Expand Down

0 comments on commit 077a4f2

Please sign in to comment.