Nashwan Azhari
3f3e2b3cce
Fix LogURI generation-related tests on Windows.
...
Signed-off-by: Nashwan Azhari <nazhari@cloudbasesolutions.com>
2022-10-21 15:32:54 +03:00
Kazuyoshi Kato
bf26140d94
Fix LogURIGenerator on Windows
...
Checking / is not the right way to distinguish an absolute path in
Windows.
Fixes #5786 .
Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2022-09-19 10:00:18 -07:00
Maksym Pavlenko
871b6b6a9f
Use testify
...
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2022-04-01 18:17:58 -07:00
Eng Zer Jun
18ec2761c0
test: use T.TempDir
to create temporary test directory
...
The directory created by `T.TempDir` is automatically removed when the
test and all its subtests complete.
Reference: https://pkg.go.dev/testing#T.TempDir
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2022-03-15 14:03:50 +08:00
Eng Zer Jun
50da673592
refactor: move from io/ioutil to io and os package
...
The io/ioutil package has been deprecated as of Go 1.16, see
https://golang.org/doc/go1.16#ioutil . This commit replaces the existing
io/ioutil functions with their new definitions in io and os packages.
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2021-09-21 09:50:38 +08:00
Akihiro Suda
d3aa7ee9f0
Run go fmt
with Go 1.17
...
The new `go fmt` adds `//go:build` lines (https://golang.org/doc/go1.17#tools ).
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2021-08-22 09:31:50 +09:00
Wei Fu
d656fa38ca
restart plugin: support binary log uri
...
Introduce LogURIGenerator helper function in cio package. It is used in
the restart options, like WithBinaryLogURI and WithFileLogURI.
And restart.LogPathLabel might be used in production and work well. In
order to reduce breaking change, the LogPathLabel is still recognized if
new LogURILabel is not set. In next release 1.5, the LogPathLabel will
be removed.
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2020-06-10 00:09:24 +08:00
Sebastiaan van Stijn
f2edc6f164
vendor: update gotest.tools v3.0.2
...
full diff: https://github.com/gotestyourself/gotest.tools/compare/v2.3.0...v3.0.2
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-02-28 17:47:20 +01:00
Maksym Pavlenko
fbf96d302a
Fix path in LogFile creator
...
Signed-off-by: Maksym Pavlenko <makpav@amazon.com>
2019-06-19 16:53:33 -07:00
Maksym Pavlenko
5e0d793801
Fix bugs in BinaryIO creator
...
Signed-off-by: Maksym Pavlenko <makpav@amazon.com>
2019-06-19 11:15:17 -07:00
Vincent Demeester
832b05ae67
Update tests to use gotest.tools angel
...
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2018-06-08 21:02:01 +02:00
Kunal Kushwaha
b12c3215a0
Licence header added
...
Signed-off-by: Kunal Kushwaha <kushwaha_kunal_v7@lab.ntt.co.jp>
2018-02-19 10:32:26 +09:00
Daniel Nephin
3279acca82
Check timestamps in snapshot storage test suite
...
also use t.Helper()
convert assertions to canonical
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2018-02-12 12:26:26 -05:00
Daniel Nephin
37aa41b164
Cleanup after migration
...
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2018-02-12 12:26:26 -05:00
Daniel Nephin
ef48a0268e
Migrate to gotestyourself/assert
...
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2018-02-12 12:26:26 -05:00
Lucas Molas
eda50b1fa6
Fix race condition in IO test (TestNewAttach)
...
Signed-off-by: Lucas Molas <lmolas@fundacionsadosky.org.ar>
2017-12-21 13:54:22 -03:00
Daniel Nephin
f34d030178
Add unit test for cio
...
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2017-12-12 16:52:16 -05:00