Giteabot
6cd2c647ec
test: compare key file contents instead of FileInfo in TestInitKeys ( #38330 ) ( #38331 )
...
Backport #38330 by @Zettat123
`TestInitKeys` verified whether a host key file was regenerated by
comparing `os.FileInfo` before and after a `InitDefaultHostKeys` call.
On systems where the OS clock / filesystem timestamp granularity is
coarse, both writes land in the same tick and get an identical mtime.
The resulting `FileInfo` is then byte-for-byte equal even though the key
was actually regenerated, so `assert.NotEqual` fails.
Since a regenerated key always produces different random bytes,
comparing the content can reliably detect regeneration.
Co-authored-by: Zettat123 <zettat123@gmail.com>
2026-07-04 20:52:52 +00:00
..
2026-07-01 20:10:11 +00:00
2026-02-01 10:35:51 +00:00
2026-05-26 15:49:31 -07:00
2026-05-31 03:33:13 +00:00
2026-05-26 15:49:31 -07:00
2026-05-26 15:49:31 -07:00
2026-05-26 15:49:31 -07:00
2026-05-26 15:49:31 -07:00
2025-04-09 16:34:38 +00:00
2026-05-26 15:49:31 -07:00
2026-03-31 17:22:18 +00:00
2026-06-08 18:18:58 +00:00
2026-05-26 15:49:31 -07:00
2026-05-26 15:49:31 -07:00
2026-05-26 15:49:31 -07:00
2026-05-26 15:49:31 -07:00
2026-05-26 15:49:31 -07:00
2026-06-08 18:18:58 +00:00
2026-06-24 05:38:02 +00:00
2026-07-02 10:07:29 +00:00
2026-05-26 15:49:31 -07:00
2026-05-26 15:49:31 -07:00
2026-05-26 15:49:31 -07:00
2026-05-26 15:49:31 -07:00
2026-05-26 15:49:31 -07:00
2026-05-26 15:49:31 -07:00
2026-06-19 21:18:17 +00:00
2026-06-14 15:52:37 +02:00
2026-06-04 00:12:02 +08:00
2026-06-04 00:12:02 +08:00
2026-06-22 07:45:24 +02:00
2026-05-29 01:12:11 +00:00
2026-04-14 14:00:20 +00:00
2026-05-29 01:12:11 +00:00
2026-06-18 07:54:16 +02:00
2026-05-26 15:49:31 -07:00
2026-05-26 15:49:31 -07:00
2026-06-15 10:29:41 +08:00
2026-05-26 15:49:31 -07:00
2026-05-26 15:49:31 -07:00
2026-05-29 01:12:11 +00:00
2026-05-26 15:49:31 -07:00
2026-05-29 01:12:11 +00:00
2026-05-26 15:49:31 -07:00
2026-06-29 06:50:22 +00:00
2026-06-03 17:40:38 +00:00
2026-05-26 15:49:31 -07:00
2026-06-13 04:43:25 +00:00
2026-05-26 15:49:31 -07:00
2026-05-26 15:49:31 -07:00
2026-05-26 15:49:31 -07:00
2026-05-28 06:14:52 +00:00
2026-05-26 15:49:31 -07:00
2026-05-26 15:49:31 -07:00
2026-05-26 15:49:31 -07:00
2026-05-26 15:49:31 -07:00
2026-06-13 04:43:25 +00:00
2026-05-26 15:49:31 -07:00
2025-02-21 00:05:40 +08:00
2026-05-26 15:49:31 -07:00
2026-06-28 09:31:35 +00:00
2026-06-14 18:26:22 +00:00
2026-07-04 20:52:52 +00:00
2026-05-26 15:49:31 -07:00
2026-06-14 19:07:25 +00:00
2026-05-26 15:49:31 -07:00
2026-05-26 15:49:31 -07:00
2025-01-21 18:57:07 +00:00
2026-05-26 15:49:31 -07:00
2026-06-08 17:16:22 +00:00
2026-06-14 15:52:37 +02:00
2026-05-26 15:49:31 -07:00
2026-05-26 15:49:31 -07:00
2026-05-26 15:49:31 -07:00
2026-05-26 15:49:31 -07:00
2026-03-26 00:37:48 +08:00
2026-05-26 15:49:31 -07:00
2026-05-26 15:49:31 -07:00
2026-05-26 15:49:31 -07:00
2026-05-26 15:49:31 -07:00
2026-02-20 16:12:22 +00:00
2026-06-04 13:38:56 +00:00