Skip to content

Commit

Permalink
Remove unit test that was no longer relevant
Browse files Browse the repository at this point in the history
With PR vmware-tanzu#232 the trusted registries include the configured plugin source.
The default central repo URI is no longer automatically trusted but only
if it is configure as a plugin source (which happens by default).

Therefore, the unit test is superceded by the unit tests of the same
file that verifies the trusted registries for configured plugin source.

Furthermore, the test that this commit removes would fail locally when
the plugin source configured is not the default central repo.

Signed-off-by: Marc Khouzam <kmarc@vmware.com>
  • Loading branch information
marckhouzam committed Apr 27, 2023
1 parent 9c9bf4c commit 475e6bf
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions pkg/config/defaults_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
package config

import (
"net/url"
"os"
"strings"

Expand Down Expand Up @@ -110,14 +109,5 @@ var _ = Describe("defaults test cases", func() {
err = os.Setenv(constants.ConfigVariableAdditionalDiscoveryForTesting, oldValue)
Expect(err).To(BeNil())
})
It("trusted registries should include hostname of default central discovery", func() {
u, err := url.ParseRequestURI("https://" + constants.TanzuCLIDefaultCentralPluginDiscoveryImage)
Expect(err).To(BeNil())
Expect(u).NotTo(BeNil())

trustedRegis := GetTrustedRegistries()
Expect(trustedRegis).NotTo(BeNil())
Expect(trustedRegis).Should(ContainElement(u.Hostname()))
})
})
})

0 comments on commit 475e6bf

Please sign in to comment.