forked from compose/transporter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrabbitmq_test.go
43 lines (37 loc) · 994 Bytes
/
rabbitmq_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
package rabbitmq
import (
"testing"
"github.com/compose/transporter/adaptor"
)
func TestDescription(t *testing.T) {
r := rabbitMQ{}
if r.Description() != description {
t.Errorf("unexpected Description, expected %s, got %s\n", description, r.Description())
}
}
func TestSampleConfig(t *testing.T) {
r := rabbitMQ{}
if r.SampleConfig() != sampleConfig {
t.Errorf("unexpected SampleConfig, expected %s, got %s\n", sampleConfig, r.SampleConfig())
}
}
var initTests = []map[string]interface{}{
{},
}
func TestInit(t *testing.T) {
for _, it := range initTests {
a, err := adaptor.GetAdaptor("rabbitmq", it)
if err != nil {
t.Fatalf("unexpected GetAdaptor() error, %s", err)
}
if _, err := a.Client(); err != nil {
t.Errorf("unexpected Client() error, %s", err)
}
if _, err := a.Reader(); err != nil {
t.Errorf("unexpected Reader() error, %s", err)
}
if _, err := a.Writer(nil, nil); err != nil {
t.Errorf("unexpected Writer() error, %s", err)
}
}
}