From 56ea3524218488bd4e60f7b4035e208ad14c7b10 Mon Sep 17 00:00:00 2001 From: Netra Mali Date: Tue, 7 Nov 2023 12:47:00 -0500 Subject: [PATCH] removed include --- oauth_client.go | 2 -- oauth_client_integration_test.go | 18 +----------------- 2 files changed, 1 insertion(+), 19 deletions(-) diff --git a/oauth_client.go b/oauth_client.go index f538ba641..a0645cad6 100644 --- a/oauth_client.go +++ b/oauth_client.go @@ -100,8 +100,6 @@ type OAuthClientIncludeOpt string const ( OauthClientOauthTokens OAuthClientIncludeOpt = "oauth_tokens" - // OauthClientProjects field is still in BETA and subject to change.** - OauthClientProjects OAuthClientIncludeOpt = "projects" ) // OAuthClientListOptions represents the options for listing diff --git a/oauth_client_integration_test.go b/oauth_client_integration_test.go index 49a3a825b..a5525a7c5 100644 --- a/oauth_client_integration_test.go +++ b/oauth_client_integration_test.go @@ -25,9 +25,6 @@ func TestOAuthClientsList(t *testing.T) { ocTest2, ocTestCleanup2 := createOAuthClient(t, client, orgTest, nil) defer ocTestCleanup2() - project, projectCleanup := createProject(t, client, orgTest) - defer projectCleanup() - t.Run("without list options", func(t *testing.T) { ocl, err := client.OAuthClients.List(ctx, orgTest.Name, nil) require.NoError(t, err) @@ -73,7 +70,7 @@ func TestOAuthClientsList(t *testing.T) { t.Run("with Include options", func(t *testing.T) { ocl, err := client.OAuthClients.List(ctx, orgTest.Name, &OAuthClientListOptions{ - Include: []OAuthClientIncludeOpt{OauthClientOauthTokens, OauthClientProjects}, + Include: []OAuthClientIncludeOpt{OauthClientOauthTokens}, }) require.NoError(t, err) require.NotEmpty(t, ocl.Items) @@ -82,19 +79,6 @@ func TestOAuthClientsList(t *testing.T) { assert.NotEmpty(t, ocl.Items[0].OAuthTokens[0].ID) }) - t.Run("with project include options", func(t *testing.T) { - psl, err := client.OAuthClients.List(ctx, orgTest.Name, &OAuthClientListOptions{ - Include: []OAuthClientIncludeOpt{OauthClientProjects}, - }) - require.NoError(t, err) - assert.Equal(t, 2, len(psl.Items)) - - assert.NotNil(t, psl.Items[0].Projects) - assert.Equal(t, 1, len(psl.Items[0].Projects)) - assert.Equal(t, project.ID, psl.Items[0].Projects[0].ID) - assert.Equal(t, project.Name, psl.Items[0].Projects[0].Name) - }) - t.Run("without a valid organization", func(t *testing.T) { ocl, err := client.OAuthClients.List(ctx, badIdentifier, nil) assert.Nil(t, ocl)