@@ -44,6 +44,7 @@ import (
44
44
"github.com/moby/buildkit/solver"
45
45
"github.com/moby/buildkit/util/compression"
46
46
"github.com/moby/buildkit/util/contentutil"
47
+ "github.com/moby/buildkit/util/converter"
47
48
"github.com/moby/buildkit/util/iohelper"
48
49
"github.com/moby/buildkit/util/leaseutil"
49
50
"github.com/moby/buildkit/util/overlay"
@@ -1423,7 +1424,7 @@ func testSharingCompressionVariant(ctx context.Context, t *testing.T, co *cmOut,
1423
1424
require .NoError (t , err , "compression: %v" , c )
1424
1425
uDgst := bDesc .Digest
1425
1426
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 ))
1427
1428
require .NoError (t , err , "compression: %v" , c )
1428
1429
uDesc , err := convertFunc (ctx , co .cs , bDesc )
1429
1430
require .NoError (t , err , "compression: %v" , c )
@@ -1558,7 +1559,7 @@ func TestConversion(t *testing.T) {
1558
1559
testName := fmt .Sprintf ("%s=>%s" , i , j )
1559
1560
1560
1561
// Prepare the source compression type
1561
- convertFunc , err := getConverter (egctx , store , orgDesc , compSrc )
1562
+ convertFunc , err := converter . New (egctx , store , orgDesc , compSrc )
1562
1563
require .NoError (t , err , testName )
1563
1564
srcDesc := & orgDesc
1564
1565
if convertFunc != nil {
@@ -1567,7 +1568,7 @@ func TestConversion(t *testing.T) {
1567
1568
}
1568
1569
1569
1570
// Convert the blob
1570
- convertFunc , err = getConverter (egctx , store , * srcDesc , compDest )
1571
+ convertFunc , err = converter . New (egctx , store , * srcDesc , compDest )
1571
1572
require .NoError (t , err , testName )
1572
1573
resDesc := srcDesc
1573
1574
if convertFunc != nil {
@@ -1576,7 +1577,7 @@ func TestConversion(t *testing.T) {
1576
1577
}
1577
1578
1578
1579
// 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 ))
1580
1581
require .NoError (t , err , testName )
1581
1582
recreatedDesc := resDesc
1582
1583
if convertFunc != nil {
0 commit comments