From 399458d7e4da9f1d2df855fb9e4c18ac495f8e25 Mon Sep 17 00:00:00 2001 From: Will Vedder Date: Tue, 25 Jul 2023 12:31:35 -0400 Subject: [PATCH] Displaying non-ready custom domains --- internal/cli/custom_domains.go | 4 ---- internal/cli/custom_domains_test.go | 15 ++++++--------- 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/internal/cli/custom_domains.go b/internal/cli/custom_domains.go index 02330e6ab..dd7e8604c 100644 --- a/internal/cli/custom_domains.go +++ b/internal/cli/custom_domains.go @@ -463,10 +463,6 @@ func (c *cli) customDomainsPickerOptions() (pickerOptions, error) { } for _, d := range domains { - if d.GetStatus() != "ready" { - continue - } - value := d.GetID() label := fmt.Sprintf("%s %s", d.GetDomain(), ansi.Faint("("+value+")")) opts = append(opts, pickerOption{value: value, label: label}) diff --git a/internal/cli/custom_domains_test.go b/internal/cli/custom_domains_test.go index 89845340a..d22d2d727 100644 --- a/internal/cli/custom_domains_test.go +++ b/internal/cli/custom_domains_test.go @@ -123,23 +123,20 @@ func TestCustomDomainsPickerOptions(t *testing.T) { { ID: auth0.String("some-id-1"), Domain: auth0.String("some-domain-1"), - Status: auth0.String("foo"), + Status: auth0.String("pending_verification"), }, { ID: auth0.String("some-id-2"), Domain: auth0.String("some-domain-2"), Status: auth0.String("ready"), }, - { - ID: auth0.String("some-id-3"), - Domain: auth0.String("some-domain-3"), - Status: auth0.String("bar"), - }, }, assertOutput: func(t testing.TB, options pickerOptions) { - assert.Len(t, options, 1) - assert.Equal(t, "some-domain-2 (some-id-2)", options[0].label) - assert.Equal(t, "some-id-2", options[0].value) + assert.Len(t, options, 2) + assert.Equal(t, "some-domain-1 (some-id-1)", options[0].label) + assert.Equal(t, "some-id-1", options[0].value) + assert.Equal(t, "some-domain-2 (some-id-2)", options[1].label) + assert.Equal(t, "some-id-2", options[1].value) }, assertError: func(t testing.TB, err error) { t.Fail()