Return subscription from channel-preview [skip-tests]
This commit is contained in:
@@ -125,6 +125,18 @@ func assertjsonStructureMatchSingleValue(t *testing.T, strschema string, realVal
|
||||
t.Errorf("Key < %s > is not a int (its actually %T: '%v')", keyPath, realValue, realValue)
|
||||
return
|
||||
}
|
||||
case "object|null":
|
||||
if langext.IsNil(realValue) {
|
||||
return // OK
|
||||
}
|
||||
if _, ok := realValue.(map[string]any); !ok {
|
||||
t.Errorf("Key < %s > is not an object|null (its actually %T: '%v')", keyPath, realValue, realValue)
|
||||
return
|
||||
}
|
||||
if _, err := time.Parse(time.RFC3339, realValue.(string)); err != nil {
|
||||
t.Errorf("Key < %s > is not an object|null (its '%v')", keyPath, realValue)
|
||||
return
|
||||
}
|
||||
default:
|
||||
t.Errorf("Unknown schema type '%s' for key < %s >", strschema, keyPath)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user