@@ -83,7 +83,16 @@ var _ = Describe("Stemcell", func() {
8383
8484 contents , err := io .ReadAll (tempFile )
8585 Expect (err ).ToNot (HaveOccurred ())
86- Expect (contents ).ToNot (ContainSubstring ("No such file or directory" ))
86+
87+ // Extract only the offending lines so failures are readable (auth.log can be
88+ // hundreds of kilobytes and Gomega truncates the full-content diff).
89+ var offending []string
90+ for _ , line := range strings .Split (string (contents ), "\n " ) {
91+ if strings .Contains (line , "No such file or directory" ) {
92+ offending = append (offending , line )
93+ }
94+ }
95+ Expect (offending ).To (BeEmpty (), "auth.log contained 'No such file or directory':\n %s" , strings .Join (offending , "\n " ))
8796 })
8897
8998 It ("#141987897: has ipv6 enabled in the kernel" , func () {
@@ -96,8 +105,11 @@ var _ = Describe("Stemcell", func() {
96105 _ , _ , exitStatus , err := bosh .Run (
97106 "--column=stdout" ,
98107 "ssh" , "default/0" , "-r" , "-c" ,
99- // sleep to ensure we have multiple samples so average can be verified
100- `sudo /usr/lib/sysstat/sa1 && sudo /usr/lib/sysstat/sa1 1 1 && sleep 2` ,
108+ // Ubuntu 26.04+ relocated sa1 to /usr/libexec/sysstat/; fall back to the
109+ // legacy path for older releases. sleep ensures multiple samples for the
110+ // Average: check.
111+ `SA1=$(ls /usr/lib/sysstat/sa1 /usr/libexec/sysstat/sa1 2>/dev/null | head -1) && ` +
112+ `sudo "$SA1" && sudo "$SA1" 1 1 && sleep 2` ,
101113 )
102114 Expect (err ).ToNot (HaveOccurred ())
103115 Expect (exitStatus ).To (Equal (0 ))
0 commit comments