Commit Graph

20 Commits

Author SHA1 Message Date
haoyun
c0d07094be feat: Errorf usage
Signed-off-by: haoyun <yun.hao@daocloud.io>
2021-12-13 14:31:53 +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
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
Shengjing Zhu
1189cc40f2 snapshots: fix flaky TestMetastore
35a8e6e589/check/containerd-build-arm64/de237af/logs/make_test.txt

--- FAIL: TestMetastore (18.27s)
    --- FAIL: TestMetastore/GetInfo (13.91s)
        metastore_test.go:242: assertion failed:
            --- expected
            +++ info
            {snapshots.Info}.Created:
            	-: s"0001-01-01 00:00:00 +0000 UTC"
            	+: s"2020-01-15 14:15:38.71882571 +0000 UTC"
            {snapshots.Info}.Updated:
            	-: s"0001-01-01 00:00:00 +0000 UTC"
            	+: s"2020-01-15 14:15:38.71882571 +0000 UTC"
            : on key committed-1

Signed-off-by: Shengjing Zhu <zhsj@debian.org>
2020-01-15 23:12:05 +08:00
Derek McGowan
d1261b5087
Update snapshot parent filter property to always exist
The parent property may be empty but always exists.

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2019-11-25 10:07:25 -08:00
Wei Fu
843423ec38 snapshots: return error if readSnapshot fails
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2019-11-11 17:53:44 +08:00
Derek McGowan
66aa1d3ef6
Add snapshot walk implementations
Temporarily remove zfs and aufs until interface update

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2019-10-24 11:11:22 -07:00
John Howard
2586f3fbb9 boltdb/bolt --> go.etcd.io/bbolt
Signed-off-by: John Howard <jhoward@microsoft.com>
2018-09-12 15:23:57 -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
Michael Crosby
009ba4d797 Move testutils to pkg
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2018-05-22 17:08:38 -04:00
Michael Wan
7fd6d5e2be fix words misspell
Signed-off-by: Michael Wan <zirenwan@gmail.com>
2018-04-23 00:09:42 -04:00
Stephen Day
220a479292
Merge pull request #1833 from dmcgowan/snapshot-gc-3rd-phase
snapshots/overlay: add overlay cleanup
2018-03-12 17:49:56 -07: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
ef48a0268e Migrate to gotestyourself/assert
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2018-02-12 12:26:26 -05:00
Derek McGowan
14d402e289
Add overlay cleanup
Updates overlay remove to simply remove the reference, adds
a cleanup method for discarding the directory.
Updates snapshot create to setup the directory structure while
in the transaction, to prevent cleanup from removing directories
which are part of a create.

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2018-01-30 16:17:41 -08:00
Daniel Nephin
0e03d778f1 Update snapshot storage error message
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2017-12-04 17:35:27 -05:00
yason
db742c90c0 get wrong parents bucket in withSnapshotBucket
improve error message for CommitActive
Signed-off-by: yason <yan.xuean@zte.com.cn>
2017-12-02 23:01:29 +08:00
yason
bb02302c9c improve rollback for overlay.prepare
improve err message
Signed-off-by: yason <yan.xuean@zte.com.cn>
2017-12-02 00:09:44 +08:00
Jess Valarezo
9885edfc44 rename snapshot->snapshots pkg
Signed-off-by: Jess Valarezo <valarezo.jessica@gmail.com>
2017-11-29 14:55:02 -08:00