Skip to content

Commit 63b09bc

Browse files
committed
fix test
1 parent 7fc1c87 commit 63b09bc

File tree

1 file changed

+14
-65
lines changed

1 file changed

+14
-65
lines changed

test/testBlocks.jl

Lines changed: 14 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -180,17 +180,7 @@ end
180180

181181
# User, Robot, Session Data Blob Entries
182182
function GraphAgentBlobentries!(fg::AbstractDFG)
183-
be = Blobentry(;
184-
id = uuid4(),
185-
blobid = uuid4(),
186-
label = :key1,
187-
blobstore = :b,
188-
hash = "",
189-
origin = "",
190-
description = "",
191-
mimeType = "",
192-
metadata = "",
193-
)
183+
be = Blobentry(; label = :key1, blobstore = :b)
194184

195185
# Agent Blob Entries
196186
ae = addAgentBlobentry!(fg, be)
@@ -847,57 +837,22 @@ function DataEntriesTestBlock!(fg, v2)
847837
# listBlobentries
848838
# emptyDataEntries
849839
# mergeDataEntries
850-
storeEntry = Blobentry(;
851-
id = uuid4(),
852-
blobid = uuid4(),
853-
label = :a,
854-
blobstore = :b,
855-
origin = "",
856-
description = "",
857-
mimetype = "",
858-
metadata = "",
859-
)
840+
storeEntry = Blobentry(; blobid = uuid4(), label = :a, blobstore = :b)
860841
@test getLabel(storeEntry) == storeEntry.label
861842
@test getTimestamp(storeEntry) == storeEntry.timestamp
862843

863844
# oid = zeros(UInt8,12); oid[12] = 0x01
864845
# de1 = MongodbDataEntry(:key1, uuid4(), NTuple{12,UInt8}(oid), "", now(localzone()))
865-
de1 = Blobentry(;
866-
id = uuid4(),
867-
blobid = uuid4(),
868-
label = :key1,
869-
blobstore = :b,
870-
origin = "",
871-
description = "",
872-
mimeType = "",
873-
metadata = "",
874-
)
846+
de1 = Blobentry(; blobid = uuid4(), label = :key1, blobstore = :b)
875847

876848
# oid = zeros(UInt8,12); oid[12] = 0x02
877849
# de2 = MongodbDataEntry(:key2, uuid4(), NTuple{12,UInt8}(oid), "", now(localzone()))
878-
de2 = Blobentry(;
879-
id = uuid4(),
880-
blobid = uuid4(),
881-
label = :key2,
882-
blobstore = :b,
883-
origin = "",
884-
description = "",
885-
mimeType = "",
886-
metadata = "",
887-
)
850+
de2 = Blobentry(; blobid = uuid4(), label = :key2, blobstore = :b)
888851

889852
# oid = zeros(UInt8,12); oid[12] = 0x03
890853
# de2_update = MongodbDataEntry(:key2, uuid4(), NTuple{12,UInt8}(oid), "", now(localzone()))
891-
de2_update = Blobentry(;
892-
id = uuid4(),
893-
blobid = uuid4(),
894-
label = :key2,
895-
blobstore = :b,
896-
origin = "",
897-
description = "Yay",
898-
mimeType = "",
899-
metadata = "",
900-
)
854+
de2_update =
855+
Blobentry(; blobid = uuid4(), label = :key2, blobstore = :b, description = "Yay")
901856

902857
#add
903858
v1 = getVariable(fg, :a)
@@ -947,39 +902,33 @@ end
947902

948903
function blobsStoresTestBlock!(fg)
949904
de1 = Blobentry(;
950-
id = uuid4(),
951905
blobid = uuid4(),
952906
label = :label1,
953907
blobstore = :store1,
954-
hash = "AAAA",
908+
crchash = 0xAAAA,
955909
origin = "origin1",
956910
description = "description1",
957-
mimeType = "mimetype1",
958-
metadata = "",
911+
mimetype = "mimetype1",
959912
)
960913
de2 = Blobentry(;
961-
id = uuid4(),
962914
blobid = uuid4(),
963915
label = :label2,
964916
blobstore = :store2,
965-
hash = "FFFF",
917+
crchash = 0xFFFF,
966918
origin = "origin2",
967919
description = "description2",
968-
mimeType = "mimetype2",
969-
metadata = "",
970-
timestamp = ZonedDateTime("2020-08-12T12:00:00.000+00:00"),
920+
mimetype = "mimetype2",
921+
timestamp = DFG.NanoDate("2020-08-12T12:00:00.000"),
971922
)
972923
de2_update = Blobentry(;
973-
id = uuid4(),
974924
blobid = uuid4(),
975925
label = :label2,
976926
blobstore = :store2,
977-
hash = "0123",
927+
crchash = 0x0123,
978928
origin = "origin2",
979929
description = "description2",
980-
mimeType = "mimetype2",
981-
metadata = "",
982-
timestamp = ZonedDateTime("2020-08-12T12:00:00.000+00:00"),
930+
mimetype = "mimetype2",
931+
timestamp = DFG.NanoDate("2020-08-12T12:00:00.000"),
983932
)
984933
@test getLabel(de1) == de1.label
985934
@test getTimestamp(de1) == de1.timestamp

0 commit comments

Comments
 (0)