Skip to content

Commit

Permalink
updated hauler testdata
Browse files Browse the repository at this point in the history
  • Loading branch information
zackbradys committed Apr 6, 2024
1 parent 003456d commit 91ff998
Show file tree
Hide file tree
Showing 9 changed files with 36 additions and 106 deletions.
6 changes: 1 addition & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,10 @@ artifacts
local-artifacts
airgap-scp.sh

# test artifacts
*.tar*
*.out

# generated
dist/
tmp/
bin/
/store/
/registry/
cmd/hauler/binaries
cmd/hauler/binaries
18 changes: 9 additions & 9 deletions pkg/content/chart/chart_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
)

var (
chartpath = "../../../testdata/podinfo-6.0.3.tgz"
chartpath = "../../../testdata/rancher-cluster-templates-0.4.4.tgz"
)

func TestNewChart(t *testing.T) {
Expand Down Expand Up @@ -48,13 +48,13 @@ func TestNewChart(t *testing.T) {
},
want: v1.Descriptor{
MediaType: consts.ChartLayerMediaType,
Size: 13524,
Size: 13102,
Digest: v1.Hash{
Algorithm: "sha256",
Hex: "e30b95a08787de69ffdad3c232d65cfb131b5b50c6fd44295f48a078fceaa44e",
Hex: "4b3bb4e474b54bf9057b298f8f11c239bb561396716d8cd5fc369c407fba2965",
},
Annotations: map[string]string{
ocispec.AnnotationTitle: "podinfo-6.0.3.tgz",
ocispec.AnnotationTitle: "rancher-cluster-templates-0.4.4.tgz",
},
},
wantErr: false,
Expand All @@ -72,18 +72,18 @@ func TestNewChart(t *testing.T) {
// TODO: Use a mock helm server
name: "should fetch a remote chart",
args: args{
name: "ingress-nginx",
opts: &action.ChartPathOptions{RepoURL: "https://kubernetes.github.io/ingress-nginx", Version: "4.0.16"},
name: "cert-manager",
opts: &action.ChartPathOptions{RepoURL: "https://charts.jetstack.io", Version: "1.14.4"},
},
want: v1.Descriptor{
MediaType: consts.ChartLayerMediaType,
Size: 38591,
Size: 80674,
Digest: v1.Hash{
Algorithm: "sha256",
Hex: "b0ea91f7febc6708ad9971871d2de6e8feb2072110c3add6dd7082d90753caa2",
Hex: "5775fdbc1881d6e510df76d38753af54b86bd14caa8edb28fdbb79527042dede",
},
Annotations: map[string]string{
ocispec.AnnotationTitle: "ingress-nginx-4.0.16.tgz",
ocispec.AnnotationTitle: "cert-manager-v1.14.4.tgz",
},
},
wantErr: false,
Expand Down
23 changes: 0 additions & 23 deletions testdata/chart-collection.yaml

This file was deleted.

56 changes: 0 additions & 56 deletions testdata/contents.yaml

This file was deleted.

Binary file added testdata/haul.tar.zst
Binary file not shown.
26 changes: 26 additions & 0 deletions testdata/hauler-manifest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
apiVersion: content.hauler.cattle.io/v1alpha1
kind: Images
metadata:
name: hauler-content-images-example
spec:
images:
- name: busybox:latest
---
apiVersion: content.hauler.cattle.io/v1alpha1
kind: Charts
metadata:
name: hauler-content-charts-example
spec:
charts:
- name: rancher
repoURL: https://releases.rancher.com/server-charts/stable
version: 2.8.2
---
apiVersion: content.hauler.cattle.io/v1alpha1
kind: Files
metadata:
name: hauler-content-files-example
spec:
files:
- path: https://get.rke2.io
name: install.sh
13 changes: 0 additions & 13 deletions testdata/k3s-collection.yaml

This file was deleted.

Binary file removed testdata/podinfo-6.0.3.tgz
Binary file not shown.
Binary file added testdata/rancher-cluster-templates-0.4.4.tgz
Binary file not shown.

0 comments on commit 91ff998

Please sign in to comment.