github.com/octohelm/cuemod@v0.9.4/pkg/modutil/util_test.go (about)

     1  package modutil
     2  
     3  import (
     4  	"context"
     5  	"testing"
     6  
     7  	. "github.com/onsi/gomega"
     8  )
     9  
    10  func TestDownload(t *testing.T) {
    11  	ctx := context.Background()
    12  
    13  	pkgs := map[string]string{
    14  		"k8s.io/api": "v0.24.0",
    15  		"github.com/rancher/local-path-provisioner": "v0.0.19",
    16  		"github.com/grafana/jsonnet-libs":           "master",
    17  	}
    18  
    19  	for p, v := range pkgs {
    20  		t.Run("download "+p+"@"+v, func(t *testing.T) {
    21  			e := Get(ctx, p, v, true)
    22  			t.Log(e.Path, e.Version, e.Dir, e.Sum)
    23  			NewWithT(t).Expect(e.Error).To(BeEmpty())
    24  		})
    25  	}
    26  }