Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos-mynij-dev
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Mynij
slapos-mynij-dev
Commits
b0ed0bc0
Commit
b0ed0bc0
authored
Feb 14, 2019
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
caddy-frontend/test: Assert file existence before rewrite
parent
b50f2166
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
20 deletions
+22
-20
software/caddy-frontend/test/test.py
software/caddy-frontend/test/test.py
+22
-20
No files found.
software/caddy-frontend/test/test.py
View file @
b0ed0bc0
...
...
@@ -2411,9 +2411,9 @@ http://apachecustomhttpsaccepted.example.com:%%(http_port)s {
self.assertEqual(httplib.NOT_FOUND, result_http.status_code)
# rewrite SR/bin/is-icmp-packet-lost
open(
os.path.join(self.software_path, '
bin
', '
is
-
icmp
-
packet
-
lost
'), '
w
'
).write('
echo
"$@"')
fname = os.path.join(self.software_path, '
bin
', '
is
-
icmp
-
packet
-
lost
')
self.assertTrue(os.path.isfile(fname))
open(fname, '
w
'
).write('
echo
"$@"')
# call the monitor for this partition
monitor_file = glob.glob(
os.path.join(
...
...
@@ -2453,9 +2453,9 @@ http://apachecustomhttpsaccepted.example.com:%%(http_port)s {
self.assertEqual(httplib.NOT_FOUND, result_http.status_code)
# rewrite SR/bin/is-icmp-packet-lost
open(
os.path.join(self.software_path, '
bin
', '
is
-
icmp
-
packet
-
lost
'), '
w
'
).write('
echo
"$@"')
fname = os.path.join(self.software_path, '
bin
', '
is
-
icmp
-
packet
-
lost
')
self.assertTrue(os.path.isfile(fname))
open(fname, '
w
'
).write('
echo
"$@"')
# call the monitor for this partition
monitor_file = glob.glob(
os.path.join(
...
...
@@ -2495,10 +2495,10 @@ http://apachecustomhttpsaccepted.example.com:%%(http_port)s {
self.assertEqual(httplib.NOT_FOUND, result_http.status_code)
# rewrite SR/bin/is-icmp-packet-lost
ope
n(
os.path.join(
self.software_path, '
bin
', '
check
-
re6st
-
optimal
-
status
'), '
w
'
).write('
echo
"$@"')
fname = os.path.joi
n(
self.software_path, '
bin
', '
check
-
re6st
-
optimal
-
status
')
self.assertTrue(os.path.isfile(fname))
open(fname, '
w
'
).write('
echo
"$@"')
# call the monitor for this partition
monitor_file = glob.glob(
os.path.join(
...
...
@@ -3836,10 +3836,10 @@ https://www.google.com {}""",
self.assertEqual(httplib.NOT_FOUND, result.status_code)
# rewrite SR/bin/is-icmp-packet-lost
ope
n(
os.path.join(
self.software_path, 'bin', 'check-re6st-optimal-status'), 'w'
).write('echo "
$
@
"')
fname = os.path.joi
n(
self.software_path, 'bin', 'check-re6st-optimal-status')
self.assertTrue(os.path.isfile(fname))
open(fname, 'w'
).write('echo "
$
@
"')
# call the monitor for this partition
monitor_file = glob.glob(
os.path.join(
...
...
@@ -4030,9 +4030,10 @@ https://www.google.com {}""",
self.assertEqual(httplib.NOT_FOUND, result_http.status_code)
# rewrite SR/bin/is-icmp-packet-lost
open(
os.path.join(self.software_path, 'bin', 'is-icmp-packet-lost'), 'w'
).write('echo "
$
@
"')
fname = os.path.join(
self.software_path, 'bin', 'is-icmp-packet-lost')
self.assertTrue(os.path.isfile(fname))
open(fname, 'w').write('echo "
$
@
"')
# call the monitor for this partition
monitor_file = glob.glob(
os.path.join(
...
...
@@ -4072,9 +4073,10 @@ https://www.google.com {}""",
self.assertEqual(httplib.NOT_FOUND, result_http.status_code)
# rewrite SR/bin/is-icmp-packet-lost
open(
os.path.join(self.software_path, 'bin', 'is-icmp-packet-lost'), 'w'
).write('echo "
$
@
"')
fname = os.path.join(
self.software_path, 'bin', 'is-icmp-packet-lost')
self.assertTrue(os.path.isfile(fname))
open(fname, 'w').write('echo "
$
@
"')
# call the monitor for this partition
monitor_file = glob.glob(
os.path.join(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment