diff --git a/pkg/content/chart/chart_test.go b/pkg/content/chart/chart_test.go index 276c9fc..ce15dd1 100644 --- a/pkg/content/chart/chart_test.go +++ b/pkg/content/chart/chart_test.go @@ -6,7 +6,6 @@ import ( "testing" v1 "github.com/google/go-containerregistry/pkg/v1" - "github.com/mholt/archiver/v3" ocispec "github.com/opencontainers/image-spec/specs-go/v1" "helm.sh/helm/v3/pkg/action" @@ -15,10 +14,6 @@ import ( "github.com/rancherfederal/hauler/pkg/content/chart" ) -var ( - chartpath = "../../../testdata/rancher-cluster-templates-0.4.4.tgz" -) - func TestNewChart(t *testing.T) { tmpdir, err := os.MkdirTemp("", "hauler") if err != nil { @@ -26,10 +21,6 @@ func TestNewChart(t *testing.T) { } defer os.RemoveAll(tmpdir) - if err := archiver.Unarchive(chartpath, tmpdir); err != nil { - t.Fatal(err) - } - type args struct { name string opts *action.ChartPathOptions @@ -43,8 +34,8 @@ func TestNewChart(t *testing.T) { { name: "should create from a chart archive", args: args{ - name: chartpath, - opts: &action.ChartPathOptions{}, + name: "rancher-cluster-templates-0.4.4.tgz", + opts: &action.ChartPathOptions{RepoURL: "../../../testdata"}, }, want: v1.Descriptor{ MediaType: consts.ChartLayerMediaType,