Merge "tox: fix the test suite"
This commit is contained in:
commit
05416dabe6
|
@ -93,10 +93,10 @@ for createuser in to_create:
|
||||||
else:
|
else:
|
||||||
cmd = "GRANT %s ON *.*" % (privilege)
|
cmd = "GRANT %s ON *.*" % (privilege)
|
||||||
|
|
||||||
cmd_local = "%s TO `%s`@'localhost' IDENTIFIED BY '%s'" \
|
cmd_local = ("%s TO `%s`@'localhost' IDENTIFIED BY '%s'" %
|
||||||
% (cmd, username, password)
|
(cmd, username, password))
|
||||||
cmd_global = "%s TO `%s`@'%%' IDENTIFIED BY '%s'" \
|
cmd_global = ("%s TO `%s`@'%%' IDENTIFIED BY '%s'" %
|
||||||
% (cmd, username, password)
|
(cmd, username, password))
|
||||||
|
|
||||||
if opts.noop:
|
if opts.noop:
|
||||||
print(cmd_local)
|
print(cmd_local)
|
||||||
|
|
|
@ -24,6 +24,7 @@ class TestOsSvcDaemon(tests.base.ScriptTestBase):
|
||||||
self._stub_script('dib-init-system', 'echo systemd')
|
self._stub_script('dib-init-system', 'echo systemd')
|
||||||
output = self._run_command(
|
output = self._run_command(
|
||||||
['elements/os-svc-install/bin/os-svc-daemon',
|
['elements/os-svc-install/bin/os-svc-daemon',
|
||||||
|
'-l',
|
||||||
'-p',
|
'-p',
|
||||||
'-n', 'foo',
|
'-n', 'foo',
|
||||||
'-u', 'bar',
|
'-u', 'bar',
|
||||||
|
@ -59,6 +60,7 @@ RequiredBy=foo.service
|
||||||
self._stub_script('dib-init-system', 'echo upstart')
|
self._stub_script('dib-init-system', 'echo upstart')
|
||||||
output = self._run_command(
|
output = self._run_command(
|
||||||
['elements/os-svc-install/bin/os-svc-daemon',
|
['elements/os-svc-install/bin/os-svc-daemon',
|
||||||
|
'-l',
|
||||||
'-p',
|
'-p',
|
||||||
'-n', 'foo',
|
'-n', 'foo',
|
||||||
'-u', 'bar',
|
'-u', 'bar',
|
||||||
|
@ -78,8 +80,8 @@ end script
|
||||||
|
|
||||||
respawn
|
respawn
|
||||||
# the default post-start of 1 second sleep delays respawning enough to
|
# the default post-start of 1 second sleep delays respawning enough to
|
||||||
# not hit the default of 10 times in 5 seconds. Make it 2 times in 5s.
|
# not hit the default of 10 times in 5 seconds. Make it 2 times in 10s.
|
||||||
respawn limit 2 5
|
respawn limit 2 10
|
||||||
|
|
||||||
exec start-stop-daemon --start -c bar --exec /opt/stack/venvs/bar/bin/baz -- a
|
exec start-stop-daemon --start -c bar --exec /opt/stack/venvs/bar/bin/baz -- a
|
||||||
|
|
||||||
|
@ -91,6 +93,7 @@ post-start exec sleep 1
|
||||||
self._stub_script('dib-init-system', 'echo systemd')
|
self._stub_script('dib-init-system', 'echo systemd')
|
||||||
output = self._run_command(
|
output = self._run_command(
|
||||||
['elements/os-svc-install/bin/os-svc-daemon',
|
['elements/os-svc-install/bin/os-svc-daemon',
|
||||||
|
'-l',
|
||||||
'-p',
|
'-p',
|
||||||
'-n', 'foo',
|
'-n', 'foo',
|
||||||
'-u', 'bar',
|
'-u', 'bar',
|
||||||
|
@ -112,6 +115,7 @@ RequiredBy=foo.service
|
||||||
self._stub_script('dib-init-system', 'echo upstart')
|
self._stub_script('dib-init-system', 'echo upstart')
|
||||||
output = self._run_command(
|
output = self._run_command(
|
||||||
['elements/os-svc-install/bin/os-svc-daemon',
|
['elements/os-svc-install/bin/os-svc-daemon',
|
||||||
|
'-l',
|
||||||
'-p',
|
'-p',
|
||||||
'-n', 'foo',
|
'-n', 'foo',
|
||||||
'-u', 'bar',
|
'-u', 'bar',
|
||||||
|
@ -134,6 +138,7 @@ end script
|
||||||
self._stub_script('dib-init-system', 'echo systemd')
|
self._stub_script('dib-init-system', 'echo systemd')
|
||||||
output = self._run_command(
|
output = self._run_command(
|
||||||
['elements/os-svc-install/bin/os-svc-daemon',
|
['elements/os-svc-install/bin/os-svc-daemon',
|
||||||
|
'-l',
|
||||||
'-p',
|
'-p',
|
||||||
'-n', 'foo',
|
'-n', 'foo',
|
||||||
'-u', 'foo',
|
'-u', 'foo',
|
||||||
|
@ -146,6 +151,7 @@ end script
|
||||||
self._stub_script('dib-init-system', 'echo upstart')
|
self._stub_script('dib-init-system', 'echo upstart')
|
||||||
output = self._run_command(
|
output = self._run_command(
|
||||||
['elements/os-svc-install/bin/os-svc-daemon',
|
['elements/os-svc-install/bin/os-svc-daemon',
|
||||||
|
'-l',
|
||||||
'-p',
|
'-p',
|
||||||
'-n', 'foo',
|
'-n', 'foo',
|
||||||
'-u', 'foo',
|
'-u', 'foo',
|
||||||
|
@ -182,6 +188,7 @@ end script
|
||||||
self._stub_script('dib-init-system', 'echo upstart')
|
self._stub_script('dib-init-system', 'echo upstart')
|
||||||
output = self._run_command(
|
output = self._run_command(
|
||||||
['elements/os-svc-install/bin/os-svc-daemon',
|
['elements/os-svc-install/bin/os-svc-daemon',
|
||||||
|
'-l',
|
||||||
'-p',
|
'-p',
|
||||||
'-n', 'foo',
|
'-n', 'foo',
|
||||||
'-u', 'foo',
|
'-u', 'foo',
|
||||||
|
|
Loading…
Reference in New Issue