Skip to content

Commit

Permalink
Use wait poll for testing
Browse files Browse the repository at this point in the history
Signed-off-by: Ruben Vargas <[email protected]>
  • Loading branch information
rubenvp8510 committed Oct 24, 2019
1 parent 4068af4 commit 768a43d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
4 changes: 0 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ require (
github.com/uber/jaeger-lib v1.5.0 // indirect
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550 // indirect
golang.org/x/lint v0.0.0-20190930215403-16217165b5de // indirect
golang.org/x/net v0.0.0-20191014212845-da9a3fd4c582
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e // indirect
golang.org/x/sys v0.0.0-20191018095205-727590c5006e // indirect
golang.org/x/tools v0.0.0-20191018000036-341939e08647 // indirect
golang.org/x/net v0.0.0-20191021144547-ec77196f6094
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e // indirect
golang.org/x/sys v0.0.0-20191022100944-742c48ecaeb7 // indirect
Expand Down
7 changes: 6 additions & 1 deletion test/e2e/elasticsearch_token_propagation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"bytes"
goctx "context"
"crypto/tls"
"errors"
"io/ioutil"
"net/http"
"net/http/cookiejar"
Expand Down Expand Up @@ -93,10 +94,14 @@ func (suite *TokenPropagationTestSuite) TestTokenPropagationTest() {
resp, err := client.Do(req)
require.NoError(t, err)
require.Equal(t, http.StatusOK, resp.StatusCode)
if resp.StatusCode != http.StatusOK {
return false, errors.New("Query service returns http code: " + string(resp.StatusCode))
}
defer resp.Body.Close()
return true, nil

})
require.NoError(t, err, "Token propagation tmake est failed")

}

func getESJaegerInstance() *v1.Jaeger {
Expand Down

0 comments on commit 768a43d

Please sign in to comment.