(t *testing.T)
| 25 | } |
| 26 | |
| 27 | func TestAddAuthFromNetrc_hasAuth(t *testing.T) { |
| 28 | defer tempEnv(t, "NETRC", "./testdata/netrc/basic")() |
| 29 | |
| 30 | u, err := url.Parse("http://username:password@example.com") |
| 31 | if err != nil { |
| 32 | t.Fatalf("err: %s", err) |
| 33 | } |
| 34 | |
| 35 | expected := u.String() |
| 36 | if err := addAuthFromNetrc(u); err != nil { |
| 37 | t.Fatalf("err: %s", err) |
| 38 | } |
| 39 | |
| 40 | actual := u.String() |
| 41 | if expected != actual { |
| 42 | t.Fatalf("Mismatch: %q != %q", actual, expected) |
| 43 | } |
| 44 | } |
| 45 | |
| 46 | func TestAddAuthFromNetrc_hasUsername(t *testing.T) { |
| 47 | defer tempEnv(t, "NETRC", "./testdata/netrc/basic")() |
nothing calls this directly
no test coverage detected