about summary refs log tree commit diff
path: root/tvix/nar-bridge/pkg/writer/writer_test.go
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2023-10-03T09·57+0300
committerclbot <clbot@tvl.fyi>2023-10-05T06·11+0000
commitb1ff1267be5f1dfa4f764648da68bbaec8366ecd (patch)
tree533d5a6af668d83db37148e18e4c311ddf49a933 /tvix/nar-bridge/pkg/writer/writer_test.go
parent6e9a5dcd5937496e4fb5ef6ebcc2b9875be4c68b (diff)
refactor(tvix/nar-bridge): drop reader package r/6693
Make the import function usable on any reader.

Change-Id: I84d2004cb73cdd7a11fe8efb0f2efb6335d5e6b0
Reviewed-on: https://cl.tvl.fyi/c/depot/+/9527
Reviewed-by: Connor Brewster <cbrewster@hey.com>
Tested-by: BuildkiteCI
Autosubmit: flokli <flokli@flokli.de>
Diffstat (limited to 'tvix/nar-bridge/pkg/writer/writer_test.go')
-rw-r--r--tvix/nar-bridge/pkg/writer/writer_test.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/tvix/nar-bridge/pkg/writer/writer_test.go b/tvix/nar-bridge/pkg/writer/writer_test.go
index 83ac717aa3d6..1c63ba78355f 100644
--- a/tvix/nar-bridge/pkg/writer/writer_test.go
+++ b/tvix/nar-bridge/pkg/writer/writer_test.go
@@ -9,7 +9,7 @@ import (
 	"testing"
 
 	castorev1pb "code.tvl.fyi/tvix/castore/protos"
-	"code.tvl.fyi/tvix/nar-bridge/pkg/reader"
+	"code.tvl.fyi/tvix/nar-bridge/pkg/importer"
 	"code.tvl.fyi/tvix/nar-bridge/pkg/writer"
 	storev1pb "code.tvl.fyi/tvix/store/protos"
 	"github.com/stretchr/testify/require"
@@ -159,9 +159,9 @@ func TestFull(t *testing.T) {
 	filesMap := make(map[string][]byte, 0)
 	directoriesMap := make(map[string]*castorev1pb.Directory)
 
-	r := reader.New(bytes.NewBuffer(narContents))
-	pathInfo, err := r.Import(
+	pathInfo, err := importer.Import(
 		context.Background(),
+		bytes.NewBuffer(narContents),
 		func(fileReader io.Reader) error {
 			fileContents, err := io.ReadAll(fileReader)
 			require.NoError(t, err)