From a245dd7c38c101b06fc29f7829aff63dbca5f278 Mon Sep 17 00:00:00 2001 From: Michael Desa Date: Tue, 5 Dec 2017 14:31:26 -0500 Subject: [PATCH] Move principal expiry into body of test --- integrations/server_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/integrations/server_test.go b/integrations/server_test.go index 6110a85b4..081546dec 100644 --- a/integrations/server_test.go +++ b/integrations/server_test.go @@ -66,8 +66,6 @@ func TestServer(t *testing.T) { Organization: "0", Subject: "billibob", Issuer: "github", - ExpiresAt: time.Now().Add(10 * time.Second), - IssuedAt: time.Now(), }, }, wants: wants{ @@ -106,8 +104,6 @@ func TestServer(t *testing.T) { Organization: "0", Subject: "billibob", Issuer: "github", - ExpiresAt: time.Now().Add(10 * time.Second), - IssuedAt: time.Now(), }, }, 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 buf, _ := json.Marshal(tt.args.payload) reqBody := ioutil.NopCloser(bytes.NewReader(buf))