about summary refs log tree commit diff
path: root/tvix/nar-bridge/pkg/importer/roundtrip_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'tvix/nar-bridge/pkg/importer/roundtrip_test.go')
-rw-r--r--tvix/nar-bridge/pkg/importer/roundtrip_test.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/tvix/nar-bridge/pkg/importer/roundtrip_test.go b/tvix/nar-bridge/pkg/importer/roundtrip_test.go
index 1daba449bd33..3f297d32dd1b 100644
--- a/tvix/nar-bridge/pkg/importer/roundtrip_test.go
+++ b/tvix/nar-bridge/pkg/importer/roundtrip_test.go
@@ -30,7 +30,7 @@ func TestRoundtrip(t *testing.T) {
 	blobsMap := make(map[string][]byte, 0)
 	directoriesMap := make(map[string]*castorev1pb.Directory)
 
-	pathInfo, err := importer.Import(
+	rootNode, _, _, err := importer.Import(
 		context.Background(),
 		bytes.NewBuffer(narContents),
 		func(blobReader io.Reader) ([]byte, error) {
@@ -56,10 +56,10 @@ func TestRoundtrip(t *testing.T) {
 	require.NoError(t, err)
 
 	// done populating everything, now actually test the export :-)
-	var buf bytes.Buffer
+	var narBuf bytes.Buffer
 	err = storev1pb.Export(
-		&buf,
-		pathInfo.Node,
+		&narBuf,
+		rootNode,
 		func(directoryDgst []byte) (*castorev1pb.Directory, error) {
 			d, found := directoriesMap[base64.StdEncoding.EncodeToString(directoryDgst)]
 			if !found {
@@ -77,5 +77,5 @@ func TestRoundtrip(t *testing.T) {
 	)
 
 	require.NoError(t, err, "exporter shouldn't fail")
-	require.Equal(t, narContents, buf.Bytes())
+	require.Equal(t, narContents, narBuf.Bytes())
 }