2019-05-08 10:51:21 +03:00
|
|
|
package revid
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
|
2019-05-09 05:41:02 +03:00
|
|
|
"bitbucket.org/ausocean/iot/pi/netsender"
|
|
|
|
)
|
2019-05-08 10:51:21 +03:00
|
|
|
|
2019-05-09 05:41:02 +03:00
|
|
|
func TestAudioInputStart(t *testing.T) {
|
|
|
|
var logger testLogger
|
|
|
|
ns, err := netsender.New(&logger, nil, nil, nil)
|
|
|
|
if err != nil {
|
|
|
|
t.Errorf("netsender.New failed with error %v", err)
|
|
|
|
}
|
2019-05-08 11:37:33 +03:00
|
|
|
|
2019-05-09 05:41:02 +03:00
|
|
|
var c Config
|
|
|
|
c.Logger = &logger
|
|
|
|
c.Input = Audio
|
2019-05-08 11:37:33 +03:00
|
|
|
|
2019-05-09 05:41:02 +03:00
|
|
|
rv, err := New(c, ns)
|
|
|
|
if err != nil {
|
|
|
|
t.Errorf("revid.New failed with error %v", err)
|
|
|
|
}
|
2019-05-08 11:37:33 +03:00
|
|
|
|
2019-05-09 05:41:02 +03:00
|
|
|
err = rv.Start()
|
|
|
|
if err != nil {
|
|
|
|
t.Errorf("revid.Start failed with error %v", err)
|
|
|
|
}
|
2019-05-08 10:51:21 +03:00
|
|
|
}
|