Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pr review cleanup
Browse files Browse the repository at this point in the history
abuchanan-airbyte committed Oct 11, 2024
1 parent 5c665e0 commit 0b4700b
Showing 3 changed files with 15 additions and 7 deletions.
2 changes: 0 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -14,7 +14,6 @@ require (
github.com/opencontainers/image-spec v1.1.0-rc6
github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58
github.com/pterm/pterm v0.12.79
github.com/stretchr/testify v1.8.4
golang.org/x/mod v0.17.0
gopkg.in/yaml.v3 v3.0.1
helm.sh/helm/v3 v3.14.2
@@ -121,7 +120,6 @@ require (
github.com/pelletier/go-toml v1.9.5 // indirect
github.com/peterbourgon/diskv v2.0.1+incompatible // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/client_golang v1.18.0 // indirect
github.com/prometheus/client_model v0.5.0 // indirect
github.com/prometheus/common v0.45.0 // indirect
2 changes: 1 addition & 1 deletion internal/cmd/images/manifest_cmd.go
Original file line number Diff line number Diff line change
@@ -21,7 +21,7 @@ import (

type ManifestCmd struct {
Chart string `help:"Path to chart." xor:"chartver"`
ChartVersion string `help:"Version to install." xor:"chartver"`
ChartVersion string `help:"Version of the chart." xor:"chartver"`
Values string `type:"existingfile" help:"An Airbyte helm chart values file to configure helm."`
}

18 changes: 14 additions & 4 deletions internal/cmd/images/manifest_cmd_test.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
package images

import (
"sort"
"testing"

"github.com/google/go-cmp/cmp"
helmlib "github.com/mittwald/go-helm-client"

"github.com/airbytehq/abctl/internal/cmd/local/helm"
"github.com/stretchr/testify/assert"
)

func getHelmTestClient(t *testing.T) helm.Client {
@@ -42,7 +43,7 @@ func TestManifestCmd(t *testing.T) {
"minio/minio:RELEASE.2023-11-20T22-40-07Z",
"temporalio/auto-setup:1.23.0",
}
assert.Equal(t, expect, actual)
compareList(t, expect, actual)
}

func TestManifestCmd_Enterprise(t *testing.T) {
@@ -75,7 +76,7 @@ func TestManifestCmd_Enterprise(t *testing.T) {
"postgres:13-alpine",
"temporalio/auto-setup:1.23.0",
}
assert.Equal(t, expect, actual)
compareList(t, expect, actual)
}

func TestManifestCmd_Nightly(t *testing.T) {
@@ -113,5 +114,14 @@ func TestManifestCmd_Nightly(t *testing.T) {
"postgres:13-alpine",
"temporalio/auto-setup:1.23.0",
}
assert.Equal(t, expect, actual)
compareList(t, expect, actual)
}

func compareList(t *testing.T, expect, actual []string) {
t.Helper()
sort.Strings(expect)
sort.Strings(actual)
if d := cmp.Diff(expect, actual); d != "" {
t.Error(d)
}
}

0 comments on commit 0b4700b

Please sign in to comment.