Move principal expiry into body of test
parent
87dcb3cfcd
commit
a245dd7c38
|
@ -66,8 +66,6 @@ func TestServer(t *testing.T) {
|
||||||
Organization: "0",
|
Organization: "0",
|
||||||
Subject: "billibob",
|
Subject: "billibob",
|
||||||
Issuer: "github",
|
Issuer: "github",
|
||||||
ExpiresAt: time.Now().Add(10 * time.Second),
|
|
||||||
IssuedAt: time.Now(),
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
wants: wants{
|
wants: wants{
|
||||||
|
@ -106,8 +104,6 @@ func TestServer(t *testing.T) {
|
||||||
Organization: "0",
|
Organization: "0",
|
||||||
Subject: "billibob",
|
Subject: "billibob",
|
||||||
Issuer: "github",
|
Issuer: "github",
|
||||||
ExpiresAt: time.Now().Add(10 * time.Second),
|
|
||||||
IssuedAt: time.Now(),
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
wants: wants{
|
wants: wants{
|
||||||
|
@ -238,6 +234,10 @@ func TestServer(t *testing.T) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Set the Expiry time on the principal
|
||||||
|
tt.args.principal.IssuedAt = time.Now()
|
||||||
|
tt.args.principal.ExpiresAt = time.Now().Add(10 * time.Second)
|
||||||
|
|
||||||
// Construct HTTP Request
|
// Construct HTTP Request
|
||||||
buf, _ := json.Marshal(tt.args.payload)
|
buf, _ := json.Marshal(tt.args.payload)
|
||||||
reqBody := ioutil.NopCloser(bytes.NewReader(buf))
|
reqBody := ioutil.NopCloser(bytes.NewReader(buf))
|
||||||
|
|
Loading…
Reference in New Issue