Skip to content

Commit

Permalink
edit version expected in test response
Browse files Browse the repository at this point in the history
  • Loading branch information
joshblakeley committed Apr 10, 2018
1 parent 2844d67 commit 5494a06
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion res_handler_header_injector_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package main

import (
"encoding/json"
"fmt"
"testing"

"github.com/TykTechnologies/tyk/apidef"
Expand Down Expand Up @@ -63,13 +64,14 @@ func TestResponseHeaderInjection(t *testing.T) {

addHeaders := map[string]string{"X-Test": "test"}
deleteHeaders := map[string]string{"X-Tyk-Mock": "1"}
userAgent := fmt.Sprintf("\"User-Agent\":\"Tyk/%v\"", VERSION)

ts.Run(t, []test.TestCase{
// Create base auth based key
{Method: "GET", Path: "/test-with-slash", HeadersMatch: addHeaders, HeadersNotMatch: deleteHeaders},
{Method: "GET", Path: "/test-no-slash", HeadersMatch: addHeaders, HeadersNotMatch: deleteHeaders},
{Method: "GET", Path: "/rewrite-test", HeadersMatch: addHeaders, HeadersNotMatch: deleteHeaders, BodyMatch: `"Url":"/newpath"`},
{Method: "GET", Path: "/rewrite-test", HeadersMatch: addHeaders, HeadersNotMatch: deleteHeaders, BodyMatch: `"X-I-Am":"Request"`},
{Method: "GET", Path: "/rewrite-test", HeadersMatch: addHeaders, HeadersNotMatch: deleteHeaders, BodyMatch: `"User-Agent":"Tyk/v2.3.99"`},
{Method: "GET", Path: "/rewrite-test", HeadersMatch: addHeaders, HeadersNotMatch: deleteHeaders, BodyMatch: userAgent},
}...)
}
2 changes: 1 addition & 1 deletion version.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
package main

const VERSION = "v2.3.99"
const VERSION = "v2.6.0"

0 comments on commit 5494a06

Please sign in to comment.