Skip to content

Commit 023182f

Browse files
fixed connection metadata test
1 parent 362a8b3 commit 023182f

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

internal/connection/docstore_repo_test.go

+2
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,14 @@ func setupDocRepoSuite(t *testing.T) *docRepoSuite {
1919
Hosts: []string{"localhost:4222"},
2020
Subscriptions: make([]Subscription, 0),
2121
Auth: make([]Auth, 0),
22+
Metadata: map[string]string{"key": "value"},
2223
}
2324
s.c2 = &Connection{
2425
Name: "c2",
2526
Hosts: []string{"localhost:4222"},
2627
Subscriptions: []Subscription{},
2728
Auth: make([]Auth, 0),
29+
Metadata: map[string]string{},
2830
}
2931
store, err := docstore.NewDocStore(":memory:")
3032
if err != nil {

internal/connection/entities.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ type Connection struct {
77
InboxPrefix string `json:"inbox_prefix"`
88
Subscriptions []Subscription `clover:"subscriptions" json:"subscriptions"`
99
Auth []Auth `json:"auth" `
10-
TLSAuth TLSAuth `clover:"tls_auth" json:"tls_auth" `
11-
Metadata map[string]string `json:"metadata" `
10+
TLSAuth TLSAuth `clover:"tls_auth" json:"tls_auth"`
11+
Metadata map[string]string `clover:"metadata" json:"metadata"`
1212
}
1313

1414
func (c *Connection) GetMetadata(key string) (string, bool) {

0 commit comments

Comments
 (0)