@@ -44,6 +44,7 @@ import (
4444 "github.com/moby/buildkit/solver"
4545 "github.com/moby/buildkit/util/compression"
4646 "github.com/moby/buildkit/util/contentutil"
47+ "github.com/moby/buildkit/util/converter"
4748 "github.com/moby/buildkit/util/iohelper"
4849 "github.com/moby/buildkit/util/leaseutil"
4950 "github.com/moby/buildkit/util/overlay"
@@ -1423,7 +1424,7 @@ func testSharingCompressionVariant(ctx context.Context, t *testing.T, co *cmOut,
14231424 require .NoError (t , err , "compression: %v" , c )
14241425 uDgst := bDesc .Digest
14251426 if c != compression .Uncompressed {
1426- convertFunc , err := getConverter (ctx , co .cs , bDesc , compression .New (compression .Uncompressed ))
1427+ convertFunc , err := converter . New (ctx , co .cs , bDesc , compression .New (compression .Uncompressed ))
14271428 require .NoError (t , err , "compression: %v" , c )
14281429 uDesc , err := convertFunc (ctx , co .cs , bDesc )
14291430 require .NoError (t , err , "compression: %v" , c )
@@ -1558,7 +1559,7 @@ func TestConversion(t *testing.T) {
15581559 testName := fmt .Sprintf ("%s=>%s" , i , j )
15591560
15601561 // Prepare the source compression type
1561- convertFunc , err := getConverter (egctx , store , orgDesc , compSrc )
1562+ convertFunc , err := converter . New (egctx , store , orgDesc , compSrc )
15621563 require .NoError (t , err , testName )
15631564 srcDesc := & orgDesc
15641565 if convertFunc != nil {
@@ -1567,7 +1568,7 @@ func TestConversion(t *testing.T) {
15671568 }
15681569
15691570 // Convert the blob
1570- convertFunc , err = getConverter (egctx , store , * srcDesc , compDest )
1571+ convertFunc , err = converter . New (egctx , store , * srcDesc , compDest )
15711572 require .NoError (t , err , testName )
15721573 resDesc := srcDesc
15731574 if convertFunc != nil {
@@ -1576,7 +1577,7 @@ func TestConversion(t *testing.T) {
15761577 }
15771578
15781579 // Check the uncompressed digest is the same as the original
1579- convertFunc , err = getConverter (egctx , store , * resDesc , compression .New (compression .Uncompressed ))
1580+ convertFunc , err = converter . New (egctx , store , * resDesc , compression .New (compression .Uncompressed ))
15801581 require .NoError (t , err , testName )
15811582 recreatedDesc := resDesc
15821583 if convertFunc != nil {
0 commit comments