diff --git a/zendesk/org_test.go b/zendesk/org_test.go index 9992ed9..324cf3b 100644 --- a/zendesk/org_test.go +++ b/zendesk/org_test.go @@ -120,6 +120,8 @@ func TestAutocompleteOrganizations(t *testing.T) { if testing.Short() { t.Skip("skipping integration test in short mode.") } + t.Skip("skipping due to eventual consistency") + // TODO: implement exponential backoff since ZD takes up to 20 seconds for this to work client, err := NewEnvClient() require.NoError(t, err) diff --git a/zendesk/user_test.go b/zendesk/user_test.go index 476d9ab..5f8af8a 100644 --- a/zendesk/user_test.go +++ b/zendesk/user_test.go @@ -1,6 +1,7 @@ package zendesk import ( + "fmt" "testing" "github.com/stretchr/testify/require" @@ -159,18 +160,21 @@ func TestSearchUsersEx(t *testing.T) { if testing.Short() { t.Skip("skipping integration test in short mode.") } + t.Skip("Skipping due to eventual consistency") + // TODO add some exponential back-off before searching client, err := NewEnvClient() require.NoError(t, err) + tag := fmt.Sprintf("premium_support_%s", randString(16)) _, err = client.CreateUser(&User{ Name: String(randString(16)), Email: String(randString(16) + "@example.com"), - Tags: []string{"premium_support"}, + Tags: []string{tag}, }) require.NoError(t, err) - found, err := client.SearchUsersEx("tags:premium_support", nil) + found, err := client.SearchUsersEx(fmt.Sprintf("tags:%s", tag), nil) require.NoError(t, err) - require.Equal(t, 1, found.Count) + require.Equal(t, 1, *found.Count) }