forked from buildpacks-community/kpack
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove custom http transport in git resolver
- The default http transport will handle proxy logic so there isnt a need for us to create our own transport
- Loading branch information
1 parent
44ebcf9
commit cf11558
Showing
3 changed files
with
1 addition
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,7 @@ import ( | |
) | ||
|
||
func TestGitCheckout(t *testing.T) { | ||
spec.Run(t, "Test Describe Image", testGitCheckout) | ||
spec.Run(t, "Test Git Checkout", testGitCheckout) | ||
} | ||
|
||
func testGitCheckout(t *testing.T, when spec.G, it spec.S) { | ||
|
@@ -35,8 +35,6 @@ func testGitCheckout(t *testing.T, when spec.G, it spec.S) { | |
|
||
metadataDir, err = os.MkdirTemp("", "test-git") | ||
require.NoError(t, err) | ||
|
||
require.NoError(t, os.Unsetenv("HTTPS_PROXY")) | ||
}) | ||
|
||
it.After(func() { | ||
|
@@ -108,15 +106,6 @@ func testGitCheckout(t *testing.T, when spec.G, it spec.S) { | |
err := fetcher.Fetch(testDir, "[email protected]:org/repo", "main", metadataDir) | ||
require.ErrorContains(t, err, "unable to fetch references for repository") | ||
}) | ||
|
||
it("uses the http proxy env vars", func() { | ||
require.NoError(t, os.Setenv("HTTPS_PROXY", "http://invalid-proxy")) | ||
defer os.Unsetenv("HTTPS_PROXY") | ||
|
||
err := fetcher.Fetch(testDir, "https://github.com/git-fixtures/basic", "master", metadataDir) | ||
require.Error(t, err) | ||
require.Contains(t, err.Error(), "proxyconnect tcp: dial tcp") | ||
}) | ||
}) | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters