File tree 5 files changed +31
-4
lines changed
maven.settings.https-auth-proxy
system.properties.https-auth-proxy
system.properties.https-proxy
5 files changed +31
-4
lines changed Original file line number Diff line number Diff line change 1
- 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()
1
+ 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 marcnuri /squid-simple-auth:latest ' . execute()
2
2
dockerRun. waitForOrKill(30_000)
3
+ def count = 10
4
+ def ready = false
5
+ while (count-- > 0 && ! ready) {
6
+ def logOut = new StringBuilder (), logErr = new StringBuilder ()
7
+ def dockerLogs = ' docker logs test-auth-proxy' . execute()
8
+ dockerLogs. consumeProcessOutput(logOut, logErr)
9
+ dockerLogs. waitForOrKill(10_000)
10
+ if (logOut. contains(' Accepting HTTP Socket connections' )) {
11
+ ready = true
12
+ }
13
+ Thread . sleep(1000 )
14
+ }
Original file line number Diff line number Diff line change 1
1
def logOut = new StringBuilder (), logErr = new StringBuilder ()
2
- def dockerLogs = ' docker exec test-auth-proxy cat /var/log/squid3 /access.log' . execute()
2
+ def dockerLogs = ' docker exec test-auth-proxy cat /opt/squid /access.log' . execute()
3
3
dockerLogs. consumeProcessOutput(logOut, logErr)
4
4
dockerLogs. waitForOrKill(10_000)
5
5
def dockerStop = ' docker stop test-auth-proxy' . execute()
6
6
dockerStop. waitForOrKill(30_000)
7
+ new FileWriter (new File (basedir, ' access.log' )). withWriter { it << logOut }
7
8
assert logOut. toString(). contains(' CONNECT services.gradle.org:443' )
8
9
def buildLog = new File (basedir, ' build.log' ). text
9
10
assert buildLog. contains(' Gradle 8.2.1 download complete' )
Original file line number Diff line number Diff line change 1
- 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()
1
+ 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 marcnuri /squid-simple-auth:latest ' . execute()
2
2
dockerRun. waitForOrKill(30_000)
3
+ def count = 10
4
+ def ready = false
5
+ while (count-- > 0 && ! ready) {
6
+ def logOut = new StringBuilder (), logErr = new StringBuilder ()
7
+ def dockerLogs = ' docker logs test-auth-proxy' . execute()
8
+ dockerLogs. consumeProcessOutput(logOut, logErr)
9
+ dockerLogs. waitForOrKill(10_000)
10
+ if (logOut. contains(' Accepting HTTP Socket connections' )) {
11
+ ready = true
12
+ }
13
+ Thread . sleep(1000 )
14
+ }
Original file line number Diff line number Diff line change 1
1
def logOut = new StringBuilder (), logErr = new StringBuilder ()
2
- def dockerLogs = ' docker exec test-auth-proxy cat /var/log/squid3 /access.log' . execute()
2
+ def dockerLogs = ' docker exec test-auth-proxy cat /opt/squid /access.log' . execute()
3
3
dockerLogs. consumeProcessOutput(logOut, logErr)
4
4
dockerLogs. waitForOrKill(10_000)
5
5
def dockerStop = ' docker stop test-auth-proxy' . execute()
6
6
dockerStop. waitForOrKill(30_000)
7
+ new FileWriter (new File (basedir, ' access.log' )). withWriter { it << logOut }
7
8
assert logOut. toString(). contains(' CONNECT services.gradle.org:443' )
8
9
def buildLog = new File (basedir, ' build.log' ). text
9
10
assert buildLog. contains(' Gradle 8.2.1 download complete' )
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ dockerLogs.consumeProcessOutput(logOut, logErr)
4
4
dockerLogs. waitForOrKill(10_000)
5
5
def dockerStop = ' docker stop test-proxy' . execute()
6
6
dockerStop. waitForOrKill(30_000)
7
+ new FileWriter (new File (basedir, ' access.log' )). withWriter { it << logOut }
7
8
assert logOut. toString(). contains(' CONNECT services.gradle.org:443' )
8
9
def buildLog = new File (basedir, ' build.log' ). text
9
10
assert buildLog. contains(' Gradle 8.2.1 download complete' )
You can’t perform that action at this time.
0 commit comments