-
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.
feat: add support for proxy basic authentication
Signed-off-by: Marc Nuri <[email protected]>
- Loading branch information
Showing
7 changed files
with
90 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
# Execute first to prevent cached versions of the plugin downloaded by other tests | ||
invoker.ordinal=999 | ||
invoker.goals.1=verify | ||
#invoker.updateSnapshots=true |
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 |
---|---|---|
@@ -1,2 +1,4 @@ | ||
# Execute first to prevent cached versions of the plugin downloaded by other tests | ||
invoker.ordinal=999 | ||
invoker.goals.1=verify | ||
#invoker.updateSnapshots=true |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
invoker.goals.1=verify -U -Dhttps.proxyHost=localhost -Dhttps.proxyPort=3128 -Dhttps.proxyUser=foo -Dhttps.proxyPassword=bar -Djdk.http.auth.tunneling.disabledSchemes= |
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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" | ||
xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<groupId>com.marcnuri.plugins.it</groupId> | ||
<artifactId>no-action</artifactId> | ||
<version>0.1-SNAPSHOT</version> | ||
<name>Maven Integration Test :: Gradle API :: HTTPS Auth Proxy</name> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>org.codehaus.groovy</groupId> | ||
<artifactId>groovy-all</artifactId> | ||
<version>${version.groovy}</version> | ||
<type>pom</type> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.gradle</groupId> | ||
<artifactId>gradle-all</artifactId> | ||
<version>${version.gradle.8}</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>com.marcnuri.plugins</groupId> | ||
<artifactId>gradle-api-maven-plugin</artifactId> | ||
<version>@project.version@</version> | ||
<extensions>true</extensions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
def dockerRun = 'docker run --rm -d --name test-auth-proxy -e SQUID_USERNAME=foo -e SQUID_PASSWORD=bar -p 0.0.0.0:3128:3128 robhaswell/squid-authenticated@sha256:6a99946c96d063981b329c22efc2b9ad1ac4e90d16ddcbb9d0b2d6773a7bea2b'.execute() | ||
dockerRun.waitForOrKill(30_000) |
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
def logOut = new StringBuilder(), logErr = new StringBuilder() | ||
def dockerLogs = 'docker exec test-auth-proxy cat /var/log/squid3/access.log'.execute() | ||
dockerLogs.consumeProcessOutput(logOut, logErr) | ||
dockerLogs.waitForOrKill(10_000) | ||
def dockerStop = 'docker stop test-auth-proxy'.execute() | ||
dockerStop.waitForOrKill(30_000) | ||
assert logOut.toString().contains('CONNECT services.gradle.org:443') | ||
def buildLog = new File(basedir, 'build.log').text | ||
assert buildLog.contains('Gradle 8.2.1 download complete') |
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