aboutsummaryrefslogtreecommitdiff
path: root/objects/object_snapshot_test.go
diff options
context:
space:
mode:
authorLaria Carolin Chabowski <laria@laria.me>2017-07-21 07:42:41 +0200
committerLaria Carolin Chabowski <laria@laria.me>2017-07-21 07:42:41 +0200
commitb3c2564730f67e99ef58f8d4e98283680dc96207 (patch)
treecae6cb921791d88971eb9441b802b8862897612e /objects/object_snapshot_test.go
parent5125eb03724aa38a8ec581c3da88f066d880a993 (diff)
downloadpetrific-b3c2564730f67e99ef58f8d4e98283680dc96207.tar.gz
petrific-b3c2564730f67e99ef58f8d4e98283680dc96207.tar.bz2
petrific-b3c2564730f67e99ef58f8d4e98283680dc96207.zip
Renamed field Container => Archive in snapshots
This is a much better name for what that is
Diffstat (limited to 'objects/object_snapshot_test.go')
-rw-r--r--objects/object_snapshot_test.go18
1 files changed, 9 insertions, 9 deletions
diff --git a/objects/object_snapshot_test.go b/objects/object_snapshot_test.go
index b610190..df150de 100644
--- a/objects/object_snapshot_test.go
+++ b/objects/object_snapshot_test.go
@@ -8,14 +8,14 @@ import (
var (
testSnapshotObj = Snapshot{
- Comment: "foo\nbar\nbaz!",
- Container: "foo",
- Date: time.Date(2017, 07, 01, 21, 40, 00, 0, time.FixedZone("", 2*60*60)),
- Tree: genId(0xff),
+ Archive: "foo",
+ Comment: "foo\nbar\nbaz!",
+ Date: time.Date(2017, 07, 01, 21, 40, 00, 0, time.FixedZone("", 2*60*60)),
+ Tree: genId(0xff),
}
testSnapshotSerialization = []byte("" +
- "container foo\n" +
+ "archive foo\n" +
"date 2017-07-01T21:40:00+02:00\n" +
"tree sha3-256:ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\n" +
"\n" +
@@ -46,10 +46,10 @@ func TestUnserializeSnapshot(t *testing.T) {
func TestUnserializeSnapshotFailure(t *testing.T) {
subtests := []struct{ name, payload string }{
{"empty", ""},
- {"missing tree", "container foo\ndate 2017-07-01T22:02:00+02:00\n"},
- {"missing container", "date 2017-07-01T22:02:00+02:00\ntree sha3-256:0000000000000000000000000000000000000000000000000000000000000000\n"},
- {"missing date", "container foo\ntree sha3-256:0000000000000000000000000000000000000000000000000000000000000000\n"},
- {"invalid date", "container foo\ndate foobar\ntree sha3-256:0000000000000000000000000000000000000000000000000000000000000000\n"},
+ {"missing tree", "archive foo\ndate 2017-07-01T22:02:00+02:00\n"},
+ {"missing archive", "date 2017-07-01T22:02:00+02:00\ntree sha3-256:0000000000000000000000000000000000000000000000000000000000000000\n"},
+ {"missing date", "archive foo\ntree sha3-256:0000000000000000000000000000000000000000000000000000000000000000\n"},
+ {"invalid date", "archive foo\ndate foobar\ntree sha3-256:0000000000000000000000000000000000000000000000000000000000000000\n"},
}
for _, subtest := range subtests {