Skip to content

Commit ac793eb

Browse files
committed
Split gsettings tests into auto/manual to account for mode changes.
1 parent 444ed12 commit ac793eb

File tree

1 file changed

+46
-46
lines changed

1 file changed

+46
-46
lines changed

.github/workflows/ubuntu.yaml

Lines changed: 46 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -87,18 +87,12 @@ jobs:
8787
gsettings get org.gnome.system.proxy.https port
8888
gsettings get org.gnome.system.proxy ignore-hosts
8989
90-
- name: Set proxy settings (gsettings)
90+
- name: Set auto proxy settings (gsettings)
9191
run: |
92-
gsettings set org.gnome.system.proxy autoconfig-url 'http://wpad/wpad2.dat'
92+
gsettings set org.gnome.system.proxy autoconfig-url 'http://127.0.0.1:8080/pac.js'
9393
gsettings set org.gnome.system.proxy mode 'auto'
94-
gsettings set org.gnome.system.proxy.http host 'my.proxy1.com'
95-
gsettings set org.gnome.system.proxy.http port 8001
96-
gsettings set org.gnome.system.proxy.https host 'my.proxy2.com'
97-
gsettings set org.gnome.system.proxy.https port 8002
98-
gsettings set org.gnome.system.proxy ignore-hosts "['localhost', '127.0.0.0/8']"
99-
gsettings set org.gnome.system.proxy use-same-proxy false
10094
101-
- name: Check proxy settings (gsettings)
95+
- name: Check auto proxy settings (gsettings)
10296
shell: bash
10397
run: |
10498
out=$(./proxycli config auto_discover)
@@ -111,53 +105,18 @@ jobs:
111105
fi
112106
out=$(./proxycli config auto_config_url)
113107
echo "Auto config url: $out"
114-
if [ "$out" = "http://wpad/wpad2.dat" ]; then
108+
if [ "$out" = "http://127.0.0.1:8080/pac.js" ]; then
115109
echo "Auto config url set successfully"
116110
else
117111
echo "Auto config url set failed"
118112
exit 1
119113
fi
120-
out=$(./proxycli config proxy http)
121-
echo "Proxy (http): $out"
122-
if [ "$out" = "my.proxy1.com:8001" ]; then
123-
echo "Proxy (http) set successfully"
124-
else
125-
echo "Proxy (http) set failed"
126-
exit 1
127-
fi
128-
out=$(./proxycli config proxy https)
129-
echo "Proxy (https): $out"
130-
if [ "$out" = "my.proxy2.com:8002" ]; then
131-
echo "Proxy (https) set successfully"
132-
else
133-
echo "Proxy (https) set failed"
134-
exit 1
135-
fi
136-
out=$(./proxycli config bypass_list)
137-
echo "Proxy bypass: $out"
138-
if [ "$out" = "localhost,127.0.0.0/8" ]; then
139-
echo "Proxy bypass set successfully"
140-
else
141-
echo "Proxy bypass set failed"
142-
exit 1
143-
fi
144114
working-directory: build/test
145115
env:
146116
XDG_CURRENT_DESKTOP: GNOME
147117

148-
- name: Set proxy auto config setting (gsettings)
149-
run: gsettings set org.gnome.system.proxy autoconfig-url 'http://127.0.0.1:8080/pac.js'
150-
151-
- name: Check proxy resolution (gsettings)
118+
- name: Check auto proxy resolution (gsettings)
152119
run: |
153-
out=$(./proxycli config auto_config_url)
154-
echo "Auto config url: $out"
155-
if [ "$out" = "http://127.0.0.1:8080/pac.js" ]; then
156-
echo "Auto config url set successfully"
157-
else
158-
echo "Auto config url set failed"
159-
exit 1
160-
fi
161120
out=$(./proxycli resolve https://google.com/)
162121
echo "Proxy for https://google.com/: $out"
163122
if [ "$out" = "direct://" ]; then
@@ -194,6 +153,47 @@ jobs:
194153
env:
195154
XDG_CURRENT_DESKTOP: GNOME
196155

156+
- name: Set manual proxy settings (gsettings)
157+
run: |
158+
gsettings set org.gnome.system.proxy mode 'manual'
159+
gsettings set org.gnome.system.proxy.http host 'my.proxy1.com'
160+
gsettings set org.gnome.system.proxy.http port 8001
161+
gsettings set org.gnome.system.proxy.https host 'my.proxy2.com'
162+
gsettings set org.gnome.system.proxy.https port 8002
163+
gsettings set org.gnome.system.proxy ignore-hosts "['localhost', '127.0.0.0/8']"
164+
gsettings set org.gnome.system.proxy use-same-proxy false
165+
166+
- name: Check manual proxy settings (gsettings)
167+
shell: bash
168+
run: |
169+
out=$(./proxycli config proxy http)
170+
echo "Proxy (http): $out"
171+
if [ "$out" = "my.proxy1.com:8001" ]; then
172+
echo "Proxy (http) set successfully"
173+
else
174+
echo "Proxy (http) set failed"
175+
exit 1
176+
fi
177+
out=$(./proxycli config proxy https)
178+
echo "Proxy (https): $out"
179+
if [ "$out" = "my.proxy2.com:8002" ]; then
180+
echo "Proxy (https) set successfully"
181+
else
182+
echo "Proxy (https) set failed"
183+
exit 1
184+
fi
185+
out=$(./proxycli config bypass_list)
186+
echo "Proxy bypass: $out"
187+
if [ "$out" = "localhost,127.0.0.0/8" ]; then
188+
echo "Proxy bypass set successfully"
189+
else
190+
echo "Proxy bypass set failed"
191+
exit 1
192+
fi
193+
working-directory: build/test
194+
env:
195+
XDG_CURRENT_DESKTOP: GNOME
196+
197197
- name: Reset proxy settings (gsettings)
198198
run: gsettings set org.gnome.system.proxy mode 'none'
199199

0 commit comments

Comments
 (0)