Improve Message Bus unit tests
Go unit tests now exercise the lowest levels of database -> mbus
integration, verifying that db.send* methods send the proper
Event objects across the message bus.
@@ -41,6 +41,11 @@ func datauuid(thing interface{}) string {
case *Task:
return fmt.Sprintf("task [%s]", thing.(*Task).UUID)
+ case Archive:
+ return fmt.Sprintf("archive [%s]", thing.(Archive).UUID)
+ case *Archive:
+ return fmt.Sprintf("archive [%s]", thing.(*Archive).UUID)
+
default:
panic("SHIELD was unable to determine the type of thing, in order to craft a message bus event for it. This is most certainly a bug in SHIELD itself.")
}
@@ -66,6 +71,9 @@ func datatype(thing interface{}) string {
case Task, *Task:
return "task"
+ case Archive, *Archive:
+ return "archive"
+
default:
panic("SHIELD was unable to determine the type of thing, in order to craft a message bus event for it. This is most certainly a bug in SHIELD itself.")
}
