|
9 | 9 |
|
10 | 10 | "github.com/MakeNowJust/heredoc" |
11 | 11 | "github.com/cli/cli/v2/api" |
12 | | - |
13 | | - "github.com/cli/cli/v2/internal/config" |
14 | 12 | "github.com/cli/cli/v2/pkg/httpmock" |
15 | 13 | "github.com/stretchr/testify/assert" |
16 | 14 | "github.com/stretchr/testify/require" |
@@ -1163,8 +1161,7 @@ func TestListLatestSessionsForViewer(t *testing.T) { |
1163 | 1161 |
|
1164 | 1162 | httpClient := &http.Client{Transport: reg} |
1165 | 1163 |
|
1166 | | - cfg := config.NewBlankConfig() |
1167 | | - capiClient := NewCAPIClient(httpClient, cfg.Authentication()) |
| 1164 | + capiClient := NewCAPIClient(httpClient, "", "github.com") |
1168 | 1165 |
|
1169 | 1166 | if tt.perPage != 0 { |
1170 | 1167 | last := defaultSessionsPerPage |
@@ -1543,8 +1540,7 @@ func TestListSessionsByResourceID(t *testing.T) { |
1543 | 1540 |
|
1544 | 1541 | httpClient := &http.Client{Transport: reg} |
1545 | 1542 |
|
1546 | | - cfg := config.NewBlankConfig() |
1547 | | - capiClient := NewCAPIClient(httpClient, cfg.Authentication()) |
| 1543 | + capiClient := NewCAPIClient(httpClient, "", "github.com") |
1548 | 1544 |
|
1549 | 1545 | if tt.perPage != 0 { |
1550 | 1546 | last := defaultSessionsPerPage |
@@ -1823,8 +1819,7 @@ func TestGetSession(t *testing.T) { |
1823 | 1819 |
|
1824 | 1820 | httpClient := &http.Client{Transport: reg} |
1825 | 1821 |
|
1826 | | - cfg := config.NewBlankConfig() |
1827 | | - capiClient := NewCAPIClient(httpClient, cfg.Authentication()) |
| 1822 | + capiClient := NewCAPIClient(httpClient, "", "github.com") |
1828 | 1823 |
|
1829 | 1824 | session, err := capiClient.GetSession(context.Background(), "some-uuid") |
1830 | 1825 |
|
@@ -1900,8 +1895,7 @@ func TestGetPullRequestDatabaseID(t *testing.T) { |
1900 | 1895 |
|
1901 | 1896 | httpClient := &http.Client{Transport: reg} |
1902 | 1897 |
|
1903 | | - cfg := config.NewBlankConfig() |
1904 | | - capiClient := NewCAPIClient(httpClient, cfg.Authentication()) |
| 1898 | + capiClient := NewCAPIClient(httpClient, "", "github.com") |
1905 | 1899 |
|
1906 | 1900 | databaseID, url, err := capiClient.GetPullRequestDatabaseID(context.Background(), "github.com", "OWNER", "REPO", 42) |
1907 | 1901 |
|
|
0 commit comments