From 90d902fa7710c61cb3271cf9cad554ec8c2424ec Mon Sep 17 00:00:00 2001 From: Tihomir Jovicic Date: Tue, 24 Aug 2021 11:00:24 +0200 Subject: [PATCH] fix mod get command tests Signed-off-by: Tihomir Jovicic --- cmd/dagger/cmd/mod/file.go | 2 +- cmd/dagger/cmd/mod/repo_test.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd/dagger/cmd/mod/file.go b/cmd/dagger/cmd/mod/file.go index 969f69e7..8ac5001a 100644 --- a/cmd/dagger/cmd/mod/file.go +++ b/cmd/dagger/cmd/mod/file.go @@ -60,7 +60,7 @@ func read(f io.Reader) (*file, error) { lines := nonEmptyLines(b) - var requires []*require + requires := make([]*require, 0, len(lines)) for _, line := range lines { split := strings.Split(line, " ") r, err := parseArgument(split[0]) diff --git a/cmd/dagger/cmd/mod/repo_test.go b/cmd/dagger/cmd/mod/repo_test.go index 5831d6f5..19375d4b 100644 --- a/cmd/dagger/cmd/mod/repo_test.go +++ b/cmd/dagger/cmd/mod/repo_test.go @@ -18,7 +18,7 @@ func TestClone(t *testing.T) { require: require{ cloneRepo: "github.com/tjovicic/dagger-modules", clonePath: "gcpcloudrun", - version: "f4a5110b86a43871", + version: "26a1d46d1b3c", }, }, { @@ -34,7 +34,7 @@ func TestClone(t *testing.T) { require: require{ cloneRepo: "github.com/tjovicic/dagger-modules", clonePath: "gcpcloudrun", - version: "v0.1", + version: "v0.3", }, }, { @@ -42,7 +42,7 @@ func TestClone(t *testing.T) { require: require{ cloneRepo: "github.com/dagger/test", clonePath: "", - version: "v0.2", + version: "main", }, privateKeyFile: "./test-ssh-keys/id_ed25519_test", privateKeyPassword: "",