mirror of
https://github.com/coder/coder.git
synced 2025-07-08 11:39:50 +00:00
test: Fix azureidentity verification test (#6284)
This commit is contained in:
committed by
GitHub
parent
f05609b4da
commit
2bb9b4ac80
@ -4,6 +4,7 @@ import (
|
||||
"context"
|
||||
"crypto/x509"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
@ -16,7 +17,11 @@ const (
|
||||
|
||||
func TestValidate(t *testing.T) {
|
||||
t.Parallel()
|
||||
vm, err := azureidentity.Validate(context.Background(), signature, x509.VerifyOptions{})
|
||||
ct, err := time.Parse(time.RFC3339, "2023-02-01T00:00:00Z")
|
||||
require.NoError(t, err)
|
||||
vm, err := azureidentity.Validate(context.Background(), signature, x509.VerifyOptions{
|
||||
CurrentTime: ct,
|
||||
})
|
||||
require.NoError(t, err)
|
||||
require.Equal(t, "bd8e7443-24a0-41f3-b949-8baf4fd1c573", vm)
|
||||
}
|
||||
|
Reference in New Issue
Block a user