diff --git a/src/internal/packager2/publish.go b/src/internal/packager2/publish.go index 495d0aa44a..84d057ce85 100644 --- a/src/internal/packager2/publish.go +++ b/src/internal/packager2/publish.go @@ -11,6 +11,9 @@ type PublishOpts struct { SkipSignatureValidation bool } -func Publish(ctx context.Context, opts PublishOpts) error { +// Takes directory/tar file & OCI Registry + +// TODO Dir points to a location on disk and registry is a URL. +func Publish(ctx context.Context, dir string, registry string, opts PublishOpts) error { return nil } diff --git a/src/internal/packager2/publish_test.go b/src/internal/packager2/publish_test.go new file mode 100644 index 0000000000..07ddab89ba --- /dev/null +++ b/src/internal/packager2/publish_test.go @@ -0,0 +1,35 @@ +package packager2 + +import ( + "context" + "github.com/stretchr/testify/require" + "testing" +) + +func TestPublish(t *testing.T) { + + tt := []struct { + name string + dir string + opts PublishOpts + }{ + { + name: "simple", + dir: "testdata/simple", + opts: PublishOpts{}, + }, + { + name: "simple", + dir: "testdata/simple", + opts: PublishOpts{}, + }, + } + + for _, tc := range tt { + t.Run(tc.name, func(t *testing.T) { + t.Parallel() + err := Publish(context.Background(), tc.opts) + require.NoError(t, err) + }) + } +}