···15 with subtest("whether logrotate works"):
16 machine.succeed(
17 # we must rotate once first to create logrotate stamp
18- "systemctl start --wait logrotate.service",
00019020 # wtmp is present in default config.
21 "rm -f /var/log/wtmp*",
22 # we need to give it at least 1MB
23 "dd if=/dev/zero of=/var/log/wtmp bs=2M count=1",
2425- # move into the future and rotate
26- "date -s 'now + 1 month + 1 day'",
27- # systemd will run logrotate from logrotate.timer automatically
28- # on date change, but if we want to wait for it to terminate
29- # it's easier to run again...
30- "systemctl start --wait logrotate.service",
31-32 # check rotate worked
33 "[ -e /var/log/wtmp.1 ]",
34 )
···15 with subtest("whether logrotate works"):
16 machine.succeed(
17 # we must rotate once first to create logrotate stamp
18+ "systemctl start logrotate.service")
19+ # we need to wait for console text once here to
20+ # clear console buffer up to this point for next wait
21+ machine.wait_for_console_text('logrotate.service: Deactivated successfully')
2223+ machine.succeed(
24 # wtmp is present in default config.
25 "rm -f /var/log/wtmp*",
26 # we need to give it at least 1MB
27 "dd if=/dev/zero of=/var/log/wtmp bs=2M count=1",
2829+ # move into the future and check rotation.
30+ "date -s 'now + 1 month + 1 day'")
31+ machine.wait_for_console_text('logrotate.service: Deactivated successfully')
32+ machine.succeed(
00033 # check rotate worked
34 "[ -e /var/log/wtmp.1 ]",
35 )
···207 end
208 end
209 end
210+diff --git a/scripts/decomposition/generate-loose-foreign-key b/scripts/decomposition/generate-loose-foreign-key
211+index 35f84c64ce1..c2fecf3404c 100755
212+--- a/scripts/decomposition/generate-loose-foreign-key
213++++ b/scripts/decomposition/generate-loose-foreign-key
214+@@ -1,4 +1,4 @@
215+-#!/usr/bin/env -S ENABLE_SPRING=0 bin/rails runner -e test
216++#!/usr/bin/env rails
217+218+ # This is helper script to swap foreign key to loose foreign key
219+ # using DB schema