Fixed api_test compile errors
This commit is contained in:
parent
d4f6d06003
commit
5e8f7451f7
17
api_test.go
17
api_test.go
|
@ -13,23 +13,24 @@ import (
|
||||||
|
|
||||||
var _ = Describe("Master", func() {
|
var _ = Describe("Master", func() {
|
||||||
var (
|
var (
|
||||||
myMaster *Master
|
m *Master
|
||||||
a *api
|
a *api
|
||||||
)
|
)
|
||||||
|
|
||||||
BeforeEach(func() {
|
BeforeEach(func() {
|
||||||
myMaster = GobotMaster()
|
m = NewMaster()
|
||||||
startApi = func(m *api) {}
|
a = Api(m)
|
||||||
a = Api(myMaster)
|
a.startFunc = func(m *api) {}
|
||||||
myMaster.Robots = []*Robot{
|
|
||||||
|
m.Robots = []*Robot{
|
||||||
newTestRobot("Robot 1"),
|
newTestRobot("Robot 1"),
|
||||||
newTestRobot("Robot 2"),
|
newTestRobot("Robot 2"),
|
||||||
newTestRobot("Robot 3"),
|
newTestRobot("Robot 3"),
|
||||||
}
|
}
|
||||||
trap = func(c chan os.Signal) {
|
m.trap = func(c chan os.Signal) {
|
||||||
c <- os.Interrupt
|
c <- os.Interrupt
|
||||||
}
|
}
|
||||||
myMaster.Start()
|
m.Start()
|
||||||
})
|
})
|
||||||
|
|
||||||
Context("when valid", func() {
|
Context("when valid", func() {
|
||||||
|
|
Loading…
Reference in New Issue