Skip to content

Commit

Permalink
make error for repospec test more verbose
Browse files Browse the repository at this point in the history
  • Loading branch information
natasha41575 committed Jul 7, 2021
1 parent b2b887f commit 356fa58
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions api/internal/git/repospec_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ package git

import (
"fmt"
"path/filepath"
"path"
"strings"
"testing"
"time"
Expand Down Expand Up @@ -37,9 +37,9 @@ var hostNamesRawAndNormalized = [][]string{
{"[email protected]/", "[email protected]:"},
}

func makeUrl(hostFmt, orgRepo, path, href string) string {
if len(path) > 0 {
orgRepo = filepath.Join(orgRepo, path)
func makeUrl(hostFmt, orgRepo, p, href string) string {
if len(p) > 0 {
orgRepo = path.Join(orgRepo, p)
}
url := hostFmt + orgRepo
if href != "" {
Expand All @@ -59,7 +59,7 @@ func TestNewRepoSpecFromUrl(t *testing.T) {
uri := makeUrl(hostRaw, orgRepo, pathName, hrefArg)
rs, err := NewRepoSpecFromUrl(uri)
if err != nil {
t.Errorf("problem %v", err)
t.Errorf("problem: %v, url: %s", err, uri)
}
if rs.Host != hostSpec {
bad = append(bad, []string{"host", uri, rs.Host, hostSpec})
Expand Down

0 comments on commit 356fa58

Please sign in to comment.