Skip to content

Commit

Permalink
test fix: revert me soon
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonc committed Jul 6, 2022
1 parent 0453163 commit d74e169
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions oauth_client_integration_test.go
Expand Up @@ -7,6 +7,7 @@ import (
"context"
"os"
"testing"
"time"

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
Expand Down Expand Up @@ -247,13 +248,22 @@ func TestOAuthClientsDelete(t *testing.T) {
err := client.OAuthClients.Delete(ctx, ocTest.ID)
require.NoError(t, err)

// TODO: This sleep was introduced as a workaround to a test failure until an in-progress API
// fix can be deployed and should be removed.
time.Sleep(5 * time.Second)

// Try loading the OAuth client - it should fail.
_, err = client.OAuthClients.Read(ctx, ocTest.ID)
assert.Equal(t, err, ErrResourceNotFound)
})

t.Run("when the OAuth client does not exist", func(t *testing.T) {
err := client.OAuthClients.Delete(ctx, ocTest.ID)

// TODO: This sleep was introduced as a workaround to a test failure until an in-progress API
// fix can be deployed and should be removed.
time.Sleep(5 * time.Second)

assert.Equal(t, err, ErrResourceNotFound)
})

Expand Down

0 comments on commit d74e169

Please sign in to comment.