Skip to content
This repository has been archived by the owner on Jul 6, 2023. It is now read-only.

Commit

Permalink
tests: fix comments in other tests
Browse files Browse the repository at this point in the history
Signed-off-by: Raghavendra Talur <rtalur@redhat.com>
  • Loading branch information
raghavendra-talur authored and phlogistonjohn committed Aug 7, 2018
1 parent 9cffa15 commit adbd44a
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions middleware/jwt_test.go
Expand Up @@ -165,7 +165,7 @@ func TestJwtMissingClaims(t *testing.T) {
// Create test server
ts := httptest.NewServer(n)

// Create token with missing 'iss' claim
// Create token with missing 'exp' claim
token := jwt.NewWithClaims(jwt.SigningMethodHS256, jwt.MapClaims{
"iss": "admin",
})
Expand All @@ -176,7 +176,7 @@ func TestJwtMissingClaims(t *testing.T) {
req, err := http.NewRequest("GET", ts.URL, nil)
tests.Assert(t, err == nil)

// Miss 'bearer' string
// Add 'bearer' string
req.Header.Set("Authorization", "bearer "+tokenString)
r, err := http.DefaultClient.Do(req)
tests.Assert(t, err == nil)
Expand Down Expand Up @@ -222,7 +222,7 @@ func TestJwtInvalidToken(t *testing.T) {
req, err := http.NewRequest("GET", ts.URL, nil)
tests.Assert(t, err == nil)

// Miss 'bearer' string
// Add 'bearer' string
req.Header.Set("Authorization", "bearer "+tokenString)
r, err := http.DefaultClient.Do(req)
tests.Assert(t, err == nil)
Expand Down Expand Up @@ -386,7 +386,7 @@ func TestJwt(t *testing.T) {
req, err := http.NewRequest("GET", ts.URL, nil)
tests.Assert(t, err == nil)

// Miss 'bearer' string
// Add 'bearer' string
req.Header.Set("Authorization", "bearer "+tokenString)
r, err := http.DefaultClient.Do(req)
tests.Assert(t, err == nil)
Expand Down Expand Up @@ -455,7 +455,7 @@ func TestJwtLeewayIAT(t *testing.T) {
req, err := http.NewRequest("GET", ts.URL, nil)
tests.Assert(t, err == nil)

// Miss 'bearer' string
// Add 'bearer' string
req.Header.Set("Authorization", "bearer "+tokenString)
r, err := http.DefaultClient.Do(req)
tests.Assert(t, err == nil)
Expand Down Expand Up @@ -839,7 +839,7 @@ func TestJwtUnknownUser(t *testing.T) {
req, err := http.NewRequest("GET", ts.URL, nil)
tests.Assert(t, err == nil)

// Miss 'bearer' string
// Add 'bearer' string
req.Header.Set("Authorization", "bearer "+tokenString)
r, err := http.DefaultClient.Do(req)
tests.Assert(t, err == nil)
Expand Down Expand Up @@ -892,7 +892,7 @@ func TestJwtInvalidKeys(t *testing.T) {
req, err := http.NewRequest("GET", ts.URL, nil)
tests.Assert(t, err == nil)

// Miss 'bearer' string
// Add 'bearer' string
req.Header.Set("Authorization", "bearer "+tokenString)
r, err := http.DefaultClient.Do(req)
tests.Assert(t, err == nil)
Expand Down Expand Up @@ -921,7 +921,7 @@ func TestJwtInvalidKeys(t *testing.T) {
req, err = http.NewRequest("GET", ts.URL, nil)
tests.Assert(t, err == nil)

// Miss 'bearer' string
// Add 'bearer' string
req.Header.Set("Authorization", "bearer "+tokenString)
r, err = http.DefaultClient.Do(req)
tests.Assert(t, err == nil)
Expand Down

0 comments on commit adbd44a

Please sign in to comment.