diff --git a/src/pkg/bundle/tarball.go b/src/pkg/bundle/tarball.go index 5b93452a0..14471a4d9 100644 --- a/src/pkg/bundle/tarball.go +++ b/src/pkg/bundle/tarball.go @@ -217,7 +217,7 @@ func (tp *tarballBundleProvider) LoadBundleMetadata() (types.PathMap, error) { return loaded, nil } -// todo: rename or refactor, there are 2 getZarfLayers functions in this codebase.... +// getZarfLayers returns the layers of the Zarf package that are in the bundle func (tp *tarballBundleProvider) getZarfLayers(store *ocistore.Store, pkgManifestDesc ocispec.Descriptor) ([]ocispec.Descriptor, int64, error) { var layersToPull []ocispec.Descriptor estimatedPkgSize := int64(0) diff --git a/src/pkg/bundler/fetcher/local.go b/src/pkg/bundler/fetcher/local.go index f3de0a1a9..ccc8b73b5 100644 --- a/src/pkg/bundler/fetcher/local.go +++ b/src/pkg/bundler/fetcher/local.go @@ -102,8 +102,6 @@ func (f *localFetcher) GetPkgMetadata() (zarfTypes.ZarfPackage, error) { func (f *localFetcher) toBundle(pkgTmp string) ([]ocispec.Descriptor, error) { ctx := context.TODO() - // todo: test the case of an optional component that only has an action (maybe also test for charts and manifests) - // load pkg and layout of pkg paths pkgSrc := zarfSources.TarballSource{ ZarfPackageOptions: &zarfTypes.ZarfPackageOptions{ diff --git a/src/pkg/bundler/pusher/remote.go b/src/pkg/bundler/pusher/remote.go index 1aba0eadf..83fbc19bc 100644 --- a/src/pkg/bundler/pusher/remote.go +++ b/src/pkg/bundler/pusher/remote.go @@ -63,7 +63,7 @@ func (p *RemotePusher) Push() (ocispec.Descriptor, error) { return zarfManifestDesc, nil } -// PushManifest pushes the Zarf pkg's manifest to either a local or remote bundle +// PushManifest pushes the Zarf pkg's manifest to a remote bundle func (p *RemotePusher) PushManifest() (ocispec.Descriptor, error) { var zarfManifestDesc ocispec.Descriptor desc, err := utils.ToOCIRemote(p.cfg.PkgRootManifest, zoci.ZarfLayerMediaTypeBlob, p.cfg.RemoteDst.OrasRemote) diff --git a/src/test/bundles/14-optional-components/uds-bundle.yaml b/src/test/bundles/14-optional-components/uds-bundle.yaml index 9df4b3229..5b5969e33 100644 --- a/src/test/bundles/14-optional-components/uds-bundle.yaml +++ b/src/test/bundles/14-optional-components/uds-bundle.yaml @@ -11,9 +11,9 @@ packages: ref: v0.33.0 optionalComponents: - git-server + - name: podinfo-and-nginx - path: "../../packages/podinfo-and-nginx" -# repository: localhost:5000/podinfo-and-nginx + path: ../../packages/podinfo-and-nginx ref: 0.0.1 optionalComponents: - podinfo diff --git a/src/test/e2e/bundle_test.go b/src/test/e2e/bundle_test.go index 2ba9ea375..129843395 100644 --- a/src/test/e2e/bundle_test.go +++ b/src/test/e2e/bundle_test.go @@ -527,6 +527,8 @@ func TestBundleOptionalComponents(t *testing.T) { createLocal(t, bundleDir, e2e.Arch) deploy(t, bundlePath) remove(t, bundlePath) + + // todo: test that imgs from optional components aren't in the bundle? } func TestBundleTmpDir(t *testing.T) { diff --git a/src/test/packages/podinfo-and-nginx/zarf.yaml b/src/test/packages/podinfo-and-nginx/zarf.yaml index a24fe0015..09c8c62e6 100644 --- a/src/test/packages/podinfo-and-nginx/zarf.yaml +++ b/src/test/packages/podinfo-and-nginx/zarf.yaml @@ -12,3 +12,8 @@ components: - name: nginx-remote import: path: ../nginx + + - name: test + description: contains only single Zarf action + import: + path: ../no-cluster/real-simple