-
Notifications
You must be signed in to change notification settings - Fork 69
Expand file tree
/
Copy pathproxy.txt
More file actions
58 lines (39 loc) · 1.65 KB
/
proxy.txt
File metadata and controls
58 lines (39 loc) · 1.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# Tests related to running the Proxy
exec docker build -qt proxy-updater .
exec docker build -qt dummy-proxy -f Dockerfile.proxy .
dependabot update go_modules dependabot/cli --updater-image proxy-updater --proxy-image dummy-proxy
stderr 'proxy \| Proxy is running'
stderr 'updater \| Updater is running'
! stderr 'proxy \| custom-ca-cert\.crt'
dependabot update go_modules dependabot/cli --proxy-cert my-cert --updater-image proxy-updater --proxy-image dummy-proxy
stderr 'proxy \| custom-ca-cert\.crt'
stderr 'proxy \| I am a certificate'
# Test that the CLI exits with non-zero if the proxy does too.
! dependabot update go_modules dependabot/cli --proxy-cert crash --updater-image proxy-updater --proxy-image dummy-proxy --proxy-username user --proxy-password pass
exec docker rmi -f proxy-updater dummy-proxy
-- crash --
crash
-- my-cert --
I am a certificate
-- Dockerfile.proxy --
FROM ubuntu:22.04
COPY --chmod=755 update-ca-certificates /usr/bin/update-ca-certificates
COPY --chmod=755 dependabot-proxy /dependabot-proxy
-- dependabot-proxy --
#!/usr/bin/env bash
echo "Proxy is running"
echo "$(</config.json)"
-- Dockerfile --
FROM ubuntu:22.04
RUN useradd dependabot
COPY --chown=dependabot --chmod=755 update-ca-certificates /usr/bin/update-ca-certificates
COPY --chown=dependabot --chmod=755 run bin/run
-- update-ca-certificates --
#!/usr/bin/env bash
ls /usr/local/share/ca-certificates || true
cat /usr/local/share/ca-certificates/custom-ca-cert.crt || true
# signal to cause the proxy to exit with a non-zero code
grep crash /usr/local/share/ca-certificates/custom-ca-cert.crt && exit 1 || true
-- run --
#!/usr/bin/env bash
echo "Updater is running"