Skip to content

Commit

Permalink
add handler to test
Browse files Browse the repository at this point in the history
  • Loading branch information
GuoYL123 committed Mar 16, 2020
1 parent 7369815 commit 4f4bbb9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions server/resource/v1/history_resource_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@ func TestHistoryResource_GetPollingData(t *testing.T) {
t.Run("list kv by service label, to create a polling data", func(t *testing.T) {
r, _ := http.NewRequest("GET", "/v1/test/kie/kv", nil)
noopH := &handler2.NoopAuthHandler{}
chain, _ := handler.CreateChain(common.Provider, "testchain1", noopH.Name())
noopH2 := &handler2.TrackHandler{}
chain, _ := handler.CreateChain(common.Provider, "testchain2", noopH.Name(), noopH2.Name())
r.Header.Set("Content-Type", "application/json")
r.Header.Set("X-Session-Id", "test")
kvr := &v1.KVResource{}
Expand All @@ -106,7 +107,7 @@ func TestHistoryResource_GetPollingData(t *testing.T) {
t.Run("get polling data", func(t *testing.T) {
r, _ := http.NewRequest("GET", "/v1/test/kie/track?sessionId=test", nil)
noopH := &handler2.NoopAuthHandler{}
chain, _ := handler.CreateChain(common.Provider, "testchain1", noopH.Name())
chain, _ := handler.CreateChain(common.Provider, "testchain2", noopH.Name())
r.Header.Set("Content-Type", "application/json")
revision := &v1.HistoryResource{}
c, err := restfultest.New(revision, chain)
Expand Down

0 comments on commit 4f4bbb9

Please sign in to comment.