From 909b85d019f7a9084c74556387c55ea1b1e24d6c Mon Sep 17 00:00:00 2001 From: Elad Tabak Date: Sun, 9 Aug 2020 15:25:35 +0300 Subject: [PATCH] Remove redundant mock hanlers --- token_test.go | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/token_test.go b/token_test.go index 21e3bfe52..52029d94e 100644 --- a/token_test.go +++ b/token_test.go @@ -511,14 +511,12 @@ var _ = Describe("Tokens", func() { It("Fails with wrong user name", func() { // Configure the server: - for i := 0; i < 100; i++ { // there are going to be several retries - oidServer.AppendHandlers( - ghttp.CombineHandlers( - VerifyPasswordGrant("baduser", "mypassword"), - RespondWithError("bad_user", "Bad user"), - ), - ) - } + oidServer.AppendHandlers( + ghttp.CombineHandlers( + VerifyPasswordGrant("baduser", "mypassword"), + RespondWithError("bad_user", "Bad user"), + ), + ) // Create the connection: connection, err := NewConnectionBuilder(). @@ -537,14 +535,12 @@ var _ = Describe("Tokens", func() { It("Fails with wrong password", func() { // Configure the server: - for i := 0; i < 100; i++ { // there are going to be several retries - oidServer.AppendHandlers( - ghttp.CombineHandlers( - VerifyPasswordGrant("myuser", "badpassword"), - RespondWithError("bad_password", "Bad password"), - ), - ) - } + oidServer.AppendHandlers( + ghttp.CombineHandlers( + VerifyPasswordGrant("myuser", "badpassword"), + RespondWithError("bad_password", "Bad password"), + ), + ) // Create the connection: connection, err := NewConnectionBuilder().