Skip to content

Commit

Permalink
fix test to be handling parsing error vmware-archive#73
Browse files Browse the repository at this point in the history
  • Loading branch information
u5surf committed Oct 24, 2018
1 parent 90afd45 commit 5658727
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cmd/gangway/handlers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,11 @@ func TestUnauthedCommandlineHandlerRedirect(t *testing.T) {

func TestParseToken(t *testing.T) {
idToken := "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWV9.EkN-DOsnsuRjRO6BxXemmJDm3HbxrbRzXglbN2S4sOkopdU4IsDxTI8jO19W_A4K8ZPJijNLis4EZsHeY559a4DFOd50_OqgHGuERTqYZyuhtF39yxJPAjUESwxk2J5k_4zM3O-vtd1Ghyo4IbqKKSy6J9mTniYJPenn5-HIirE"
token, _ := parseToken(idToken)
token, err := parseToken(idToken)

if err != nil {
t.Fatalf("Fatal Error parsing token. %s", err)
}
if token.Raw != idToken {
t.Errorf("Error parsing token. Expect raw token to be %s, but instead got %s", idToken, token.Raw)
}
Expand Down

0 comments on commit 5658727

Please sign in to comment.