Skip to content

Commit 841fc5e

Browse files
committed
itest: add basic RPC form sanity check in AssertUniverseRootEqual
1 parent b9935e5 commit 841fc5e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

itest/assertions.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1099,6 +1099,11 @@ func AssertUniverseRoot(t *testing.T, client unirpc.UniverseClient,
10991099
}
11001100

11011101
func AssertUniverseRootEqual(a, b *unirpc.UniverseRoot) bool {
1102+
// Basic RPC form sanity checks.
1103+
if (a.Id != nil && b.Id == nil) || (a.Id == nil && b.Id != nil) {
1104+
return false
1105+
}
1106+
11021107
// The ids should batch exactly.
11031108
if !reflect.DeepEqual(a.Id.Id, b.Id.Id) {
11041109
return false

0 commit comments

Comments
 (0)