From 86e764778e05994d77024becc574e9f4d78c5cbf Mon Sep 17 00:00:00 2001 From: Eduardo Apolinario <653394+eapolinario@users.noreply.github.com> Date: Wed, 4 May 2022 18:06:38 -0700 Subject: [PATCH] Fix getAllExample (#320) Signed-off-by: Eduardo Apolinario Co-authored-by: Eduardo Apolinario --- flytectl/cmd/register/register_util.go | 2 +- flytectl/cmd/register/register_util_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/flytectl/cmd/register/register_util.go b/flytectl/cmd/register/register_util.go index 90c18c7444..8231026385 100644 --- a/flytectl/cmd/register/register_util.go +++ b/flytectl/cmd/register/register_util.go @@ -656,7 +656,7 @@ func filterExampleFromRelease(releases *github.RepositoryRelease) []*github.Rele func getAllExample(repository, version string, repoService g.GHRepoService) ([]*github.ReleaseAsset, *github.RepositoryRelease, error) { if len(version) > 0 { - release, err := g.GetReleaseByTag(version, repository, repoService) + release, err := g.GetReleaseByTag(repository, version, repoService) if err != nil { return nil, nil, err } diff --git a/flytectl/cmd/register/register_util_test.go b/flytectl/cmd/register/register_util_test.go index e1d3093410..c9d90280dd 100644 --- a/flytectl/cmd/register/register_util_test.go +++ b/flytectl/cmd/register/register_util_test.go @@ -458,7 +458,7 @@ func TestGetAllFlytesnacksExample(t *testing.T) { mockGh := &ghMocks.GHRepoService{} tag := "v0.15.0" sandboxManifest := "flyte_sandbox_manifest.tgz" - mockGh.OnGetReleaseByTagMatch(mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(&github.RepositoryRelease{ + mockGh.OnGetReleaseByTagMatch(mock.Anything, mock.Anything, mock.Anything, tag).Return(&github.RepositoryRelease{ TagName: &tag, Assets: []*github.ReleaseAsset{{ Name: &sandboxManifest,