diff --git a/elements/mysql-common/os-refresh-config/post-configure.d/50-mysql-users b/elements/mysql-common/os-refresh-config/post-configure.d/50-mysql-users index fcf3f97e1..86c5ea02d 100755 --- a/elements/mysql-common/os-refresh-config/post-configure.d/50-mysql-users +++ b/elements/mysql-common/os-refresh-config/post-configure.d/50-mysql-users @@ -93,10 +93,10 @@ for createuser in to_create: else: cmd = "GRANT %s ON *.*" % (privilege) - cmd_local = "%s TO `%s`@'localhost' IDENTIFIED BY '%s'" \ - % (cmd, username, password) - cmd_global = "%s TO `%s`@'%%' IDENTIFIED BY '%s'" \ - % (cmd, username, password) + cmd_local = ("%s TO `%s`@'localhost' IDENTIFIED BY '%s'" % + (cmd, username, password)) + cmd_global = ("%s TO `%s`@'%%' IDENTIFIED BY '%s'" % + (cmd, username, password)) if opts.noop: print(cmd_local) diff --git a/elements/os-svc-install/tests/test_os_svc_daemon.py b/elements/os-svc-install/tests/test_os_svc_daemon.py index 6a946866b..5a439b763 100644 --- a/elements/os-svc-install/tests/test_os_svc_daemon.py +++ b/elements/os-svc-install/tests/test_os_svc_daemon.py @@ -24,6 +24,7 @@ class TestOsSvcDaemon(tests.base.ScriptTestBase): self._stub_script('dib-init-system', 'echo systemd') output = self._run_command( ['elements/os-svc-install/bin/os-svc-daemon', + '-l', '-p', '-n', 'foo', '-u', 'bar', @@ -59,6 +60,7 @@ RequiredBy=foo.service self._stub_script('dib-init-system', 'echo upstart') output = self._run_command( ['elements/os-svc-install/bin/os-svc-daemon', + '-l', '-p', '-n', 'foo', '-u', 'bar', @@ -78,8 +80,8 @@ end script respawn # 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. -respawn limit 2 5 +# not hit the default of 10 times in 5 seconds. Make it 2 times in 10s. +respawn limit 2 10 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') output = self._run_command( ['elements/os-svc-install/bin/os-svc-daemon', + '-l', '-p', '-n', 'foo', '-u', 'bar', @@ -112,6 +115,7 @@ RequiredBy=foo.service self._stub_script('dib-init-system', 'echo upstart') output = self._run_command( ['elements/os-svc-install/bin/os-svc-daemon', + '-l', '-p', '-n', 'foo', '-u', 'bar', @@ -134,6 +138,7 @@ end script self._stub_script('dib-init-system', 'echo systemd') output = self._run_command( ['elements/os-svc-install/bin/os-svc-daemon', + '-l', '-p', '-n', 'foo', '-u', 'foo', @@ -146,6 +151,7 @@ end script self._stub_script('dib-init-system', 'echo upstart') output = self._run_command( ['elements/os-svc-install/bin/os-svc-daemon', + '-l', '-p', '-n', 'foo', '-u', 'foo', @@ -182,6 +188,7 @@ end script self._stub_script('dib-init-system', 'echo upstart') output = self._run_command( ['elements/os-svc-install/bin/os-svc-daemon', + '-l', '-p', '-n', 'foo', '-u', 'foo',