pkg/urlutil: don't compare to bool

Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com>
Upstream-commit: 90a44b875ca87e0b990eef24a3fb84275d0e6fb1
Component: engine
This commit is contained in:
unclejack
2017-03-30 12:16:48 +03:00
parent b17c0beaf9
commit 5ea7e1e7af

View File

@ -29,13 +29,13 @@ var (
func TestValidGitTransport(t *testing.T) {
for _, url := range gitUrls {
if IsGitTransport(url) == false {
if !IsGitTransport(url) {
t.Fatalf("%q should be detected as valid Git prefix", url)
}
}
for _, url := range incompleteGitUrls {
if IsGitTransport(url) == true {
if IsGitTransport(url) {
t.Fatalf("%q should not be detected as valid Git prefix", url)
}
}
@ -43,19 +43,19 @@ func TestValidGitTransport(t *testing.T) {
func TestIsGIT(t *testing.T) {
for _, url := range gitUrls {
if IsGitURL(url) == false {
if !IsGitURL(url) {
t.Fatalf("%q should be detected as valid Git url", url)
}
}
for _, url := range incompleteGitUrls {
if IsGitURL(url) == false {
if !IsGitURL(url) {
t.Fatalf("%q should be detected as valid Git url", url)
}
}
for _, url := range invalidGitUrls {
if IsGitURL(url) == true {
if IsGitURL(url) {
t.Fatalf("%q should not be detected as valid Git prefix", url)
}
}
@ -63,7 +63,7 @@ func TestIsGIT(t *testing.T) {
func TestIsTransport(t *testing.T) {
for _, url := range transportUrls {
if IsTransportURL(url) == false {
if !IsTransportURL(url) {
t.Fatalf("%q should be detected as valid Transport url", url)
}
}