Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
henrod committed Aug 14, 2018
1 parent 4500dac commit 3f486de
Showing 1 changed file with 54 additions and 6 deletions.
60 changes: 54 additions & 6 deletions app_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -483,17 +483,65 @@ func TestExtractSpan(t *testing.T) {
}

func TestDocumentation(t *testing.T) {
initApp()
Configure(true, "testtype", Standalone, map[string]string{}, viper.New())
acc := acceptor.NewTCPAcceptor("0.0.0.0:0")
AddAcceptor(acc)
// initApp()
// Configure(true, "testtype", Standalone, map[string]string{}, viper.New())
// acc := acceptor.NewTCPAcceptor("0.0.0.0:0")
// AddAcceptor(acc)

go Start()
// go Start()

doc, err := Documentation()
assert.NoError(t, err)
assert.Equal(t, map[string]interface{}{
"handlers": map[string]interface{}{},
"remotes": map[string]interface{}{},
"remotes": map[string]interface{}{
"testtype.sys.bindsession": map[string]interface{}{
"input": map[string]interface{}{
"uid": "string",
"data": "[]byte",
"id": "int64",
},
"output": []interface{}{
map[string]interface{}{
"error": map[string]interface{}{
"msg": "string",
"code": "string",
"metadata": "map[string]string",
},
"data": "[]byte",
},
"error",
},
},
"testtype.sys.kick": map[string]interface{}{
"input": map[string]interface{}{
"userId": "string",
},
"output": []interface{}{
map[string]interface{}{
"kicked": "bool",
},
"error",
},
},
"testtype.sys.pushsession": map[string]interface{}{
"input": map[string]interface{}{
"data": "[]byte",
"id": "int64",
"uid": "string",
},
"output": []interface{}{
map[string]interface{}{
"error": map[string]interface{}{
"code": "string",
"metadata": "map[string]string",
"msg": "string",
},
"data": "[]byte",
},
"error",
},
},
},
}, doc)
}

0 comments on commit 3f486de

Please sign in to comment.