Skip to content

Commit

Permalink
fix unit test
Browse files Browse the repository at this point in the history
Signed-off-by: Case Wylie <cmwylie19@defenseunicorns.com>
  • Loading branch information
cmwylie19 committed Aug 8, 2023
1 parent 8aee64b commit 63315ab
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/pkg/utils/helpers/url_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ type testURLs struct {
paths []string
}

func (suite *TestNetworkSuite) SetupSuite() {
func (suite *TestURLSuite) SetupSuite() {
suite.Assertions = require.New(suite.T())
suite.urls.good = []string{
"https://zarf.dev",
Expand All @@ -46,7 +46,7 @@ func (suite *TestNetworkSuite) SetupSuite() {
}
}

func (suite *TestNetworkSuite) Test_0_IsURL() {
func (suite *TestURLSuite) Test_0_IsURL() {
all := append(suite.urls.good, suite.urls.oci...)
for _, url := range all {
suite.True(IsURL(url), "Expected %s to be a valid URL", url)
Expand All @@ -56,7 +56,7 @@ func (suite *TestNetworkSuite) Test_0_IsURL() {
}
}

func (suite *TestNetworkSuite) Test_1_IsOCIURL() {
func (suite *TestURLSuite) Test_1_IsOCIURL() {
for _, url := range suite.urls.good {
suite.False(IsOCIURL(url), "Expected %s to be an invalid OCI URL", url)
}
Expand All @@ -68,7 +68,7 @@ func (suite *TestNetworkSuite) Test_1_IsOCIURL() {
}
}

func (suite *TestNetworkSuite) Test_2_DoHostnamesMatch() {
func (suite *TestURLSuite) Test_2_DoHostnamesMatch() {

b, err := DoHostnamesMatch("https://zarf.dev", "https://zarf.dev")
suite.NoError(err)
Expand All @@ -91,5 +91,5 @@ func (suite *TestNetworkSuite) Test_2_DoHostnamesMatch() {
}

func TestURL(t *testing.T) {
suite.Run(t, new(TestNetworkSuite))
suite.Run(t, new(TestURLSuite))
}

0 comments on commit 63315ab

Please sign in to comment.