-
Notifications
You must be signed in to change notification settings - Fork 56
Open
Labels
Description
Describe the bug
after running htmltest wrote the following entry in the refcache:
{"https://example.com":{"StatusCode":200,"LastSeen":"2024-10-07T14:48:00.1728308939Z"}}When I run htmltest now, it panics with the following error:
htmltest started at 10:08:27 on .
========================================================================
panic: parsing time "\"2024-10-07T14:48:00.1728308939Z\"": fractional second out of range
goroutine 1 [running]:
github.com/wjdp/htmltest/output.CheckErrorPanic(...)
/home/runner/work/htmltest/htmltest/output/error.go:22
github.com/wjdp/htmltest/refcache.(*RefCache).ReadStore(0x1400011e420, {0x14000137240, 0x1b})
/home/runner/work/htmltest/htmltest/refcache/refcache.go:48 +0x1d4
github.com/wjdp/htmltest/refcache.NewRefCache({0x14000137240, 0x1b}, {0x100a55d6c, 0x4})
/home/runner/work/htmltest/htmltest/refcache/refcache.go:27 +0xa8
github.com/wjdp/htmltest/htmltest.Test(0x14000113aa0)
/home/runner/work/htmltest/htmltest/htmltest/htmltest.go:93 +0x4fc
main.run(0x14000113aa0)
/home/runner/work/htmltest/htmltest/main.go:163 +0x188
main.main()
/home/runner/work/htmltest/htmltest/main.go:71 +0x2c0
The issue seems to be related to the LastSeen timestamp, because it works if I change the fractional seconds, e.g. removing the 9 at the end.
To Reproduce
- Create a refcache.json with the entry mentioned above
- Run htmltest
.htmltest.yml
Please copy in your config file
CacheExpires: 9000hVersions
- OS: MacOS & GitHub Runners (Ubuntu 20.04)
- htmltest: 0.17.0
chalin