Skip to content

Commit

Permalink
Adding debug output to try to understand flaky test
Browse files Browse the repository at this point in the history
  • Loading branch information
Emma Turetsky committed Mar 7, 2024
1 parent 7d95870 commit 066687a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions director/redirect_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ import (
"github.com/lestrrat-go/jwx/v2/jwa"
"github.com/lestrrat-go/jwx/v2/jwk"
"github.com/lestrrat-go/jwx/v2/jwt"
log "github.com/sirupsen/logrus"
"github.com/spf13/viper"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
Expand Down Expand Up @@ -239,13 +240,15 @@ func TestDirectorRegistration(t *testing.T) {

ad := common.OriginAdvertiseV1{Name: "test", URL: "https://or-url.org", Namespaces: []common.NamespaceAdV1{{Path: "/foo/bar", Issuer: isurl}}}

log.Debugln("Checking V1 Ad", ad)
jsonad, err := json.Marshal(ad)
assert.NoError(t, err, "Error marshalling OriginAdvertise")

setupRequest(c, r, jsonad, token)

r.ServeHTTP(w, c.Request)

log.Debugln("Checking Result", w.Result().Body)
// Check to see that the code exits with status code 200 after given it a good token
assert.Equal(t, 200, w.Result().StatusCode, "Expected status code of 200")

Expand Down

0 comments on commit 066687a

Please sign in to comment.