Commit Graph

9 Commits

Author SHA1 Message Date
Tonis Tiigi
87e0f4bf08 hack: update golangci-lint to 1.61
Unblock CI with the schema verify error in 1.60

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2024-09-09 14:22:27 -07:00
Tonis Tiigi
df0d9d791d ci: update golangci-lint to v1.60.1
Previous version runs out of memory on go1.23

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2024-08-14 16:29:22 +03:00
Tonis Tiigi
d7b3e02a55 lint: finish up testifylint
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2024-07-12 16:03:18 -07:00
Eng Zer Jun
be6501b654 test: use T.TempDir to create temporary test directory
This commit replaces `os.MkdirTemp` with `t.TempDir` in tests. The
directory created by `t.TempDir` is automatically removed when the test
and all its subtests complete.

Prior to this commit, temporary directory created using `os.MkdirTemp`
needs to be removed manually by calling `os.RemoveAll`, which is omitted
in some tests. The error handling boilerplate e.g.
	defer func() {
		if err := os.RemoveAll(dir); err != nil {
			t.Fatal(err)
		}
	}
is also tedious, but `t.TempDir` handles this for us nicely.

Reference: https://pkg.go.dev/testing#T.TempDir
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2022-07-24 02:27:26 +08:00
CrazyMax
8679e23647 lint: fix issues with go 1.18
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-03-25 09:06:47 +01:00
Paul "TBBle" Hampson
f4393eaa31 Ensure that time has passed between foo0 and foo1
On Windows, the resolution of time.Now() can be surprisingly low: 15ms
according to the comments in the source of time.Now().

Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
2020-07-30 03:21:30 +10:00
Tonis Tiigi
37b8832d00 upgrade errors checks to Is()
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-04-18 22:53:38 -07:00
Tonis Tiigi
73eaeba88c boltdbcache: fix releasing results
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-07-23 18:43:32 -07:00
Tonis Tiigi
fc888e6413 solver: move cachestorage testsuite
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-05-14 09:53:34 -07:00