Skip to content

Commit d158800

Browse files
Merge pull request #420 from okta/hot-fix
hot fix for terraform
2 parents 65eaaba + 9ac2570 commit d158800

5 files changed

Lines changed: 8 additions & 20 deletions

File tree

.generator/config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ additionalProperties:
88
enumClassPrefix: true
99
generateInterfaces: true
1010
packageName: okta
11-
packageVersion: 3.0.17
11+
packageVersion: 3.0.19
1212
useOneOfDiscriminatorLookup: true
1313
disallowAdditionalPropertiesIfNotPresent: false
1414
files:

.generator/okta-management-APIs-oasv3-enum-inheritance.yaml

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -26705,9 +26705,6 @@ components:
2670526705
profile:
2670626706
type: object
2670726707
description: Contains any valid JSON schema for specifying properties that can be referenced from a request (only available to OAuth 2.0 client apps)
26708-
additionalProperties:
26709-
type: object
26710-
properties: {}
2671126708
signOnMode:
2671226709
$ref: '#/components/schemas/ApplicationSignOnMode'
2671326710
status:
@@ -35891,20 +35888,9 @@ components:
3589135888
readOnly: true
3589235889
nullable: true
3589335890
transitioningToStatus:
35894-
type: string
35895-
description: The target status of an in-progress asynchronous status transition. This property is only returned if the user's state is transitioning.
35896-
readOnly: true
35897-
nullable: true
35898-
enum:
35899-
- ACTIVE
35900-
- DEPROVISIONED
35901-
- PROVISIONED
35891+
$ref: '#/components/schemas/UserStatus'
3590235892
type:
35903-
type: string
35904-
description: |-
35905-
The user type that determines the schema for the user's profile. The `type` property is a map that identifies
35906-
the User Type (see [User Types](https://developer.okta.com/docs/api/openapi/okta-management/management/tag/UserType/#tag/UserType)).
35907-
Currently it contains a single element, `id`. It can be specified when creating a new user, and may be updated by an administrator on a full replace of an existing user (but not a partial update).
35893+
$ref: '#/components/schemas/UserType'
3590835894
_embedded:
3590935895
type: object
3591035896
description: If specified, includes embedded resources related to the user

.generator/templates/api_application_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package okta
33
import (
44
"os"
55
"path"
6+
"strings"
67
"testing"
78
"time"
89

@@ -387,7 +388,7 @@ func Test_Scope_Consent_Grant_Operation_For_Application(t *testing.T) {
387388
var grant *OAuth2ScopeConsentGrant
388389
t.Run("grant consent to scope", func(t *testing.T) {
389390
payload := OAuth2ScopeConsentGrant{}
390-
payload.SetIssuer(apiClient.cfg.Okta.Client.OrgUrl)
391+
payload.SetIssuer(strings.TrimRight(apiClient.cfg.Okta.Client.OrgUrl, "/"))
391392
payload.SetScopeId("okta.users.read")
392393
grant, _, err = apiClient.ApplicationGrantsAPI.GrantConsentToScope(apiClient.cfg.Context, createdApp.OpenIdConnectApplication.GetId()).OAuth2ScopeConsentGrant(payload).Execute()
393394
assert.Nil(t, err, "grant consent to scope should not error")

.generator/templates/api_idp_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ func Test_Get_Key(t *testing.T) {
9494
t.Run("get list idp keys", func(t *testing.T) {
9595
lidpk, _, err := apiClient.IdentityProviderAPI.ListIdentityProviderKeys(apiClient.cfg.Context).Execute()
9696
require.NoError(t, err, "Could not get list idp")
97-
assert.Equal(t, len(lidpk), 1)
97+
assert.Equal(t, len(lidpk), 3)
9898
})
9999
_, err = apiClient.IdentityProviderAPI.DeleteIdentityProviderKey(apiClient.cfg.Context, createdKey.GetKid()).Execute()
100100
require.NoError(t, err, "Clean up idp key should not error")

.generator/templates/api_policy_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,13 +113,14 @@ func Test_Activate_Policy(t *testing.T) {
113113
}
114114

115115
// ACCESS/AUTHENTICATION POLICY ONLY
116+
// TODO Used to work, now fail with 401
116117
func Test_Clone_Policy(t *testing.T) {
117118
createdPolicy, _, err := setupAccessPolicy(randomTestString())
118119
require.NoError(t, err, "Creating a new policy should not error")
119120
var policyID string
120121
t.Run("clone policy", func(t *testing.T) {
121122
policy, _, err := apiClient.PolicyAPI.ClonePolicy(apiClient.cfg.Context, createdPolicy.AccessPolicy.GetId()).Execute()
122-
require.NoError(t, err, "Could not get policy by ID")
123+
require.NoError(t, err, "Could not clone policy")
123124
policyID = policy.AccessPolicy.GetId()
124125
assert.NotEqual(t, createdPolicy.AccessPolicy.GetId(), policy.AccessPolicy.GetId())
125126
assert.Equal(t, fmt.Sprintf("[cloned] %v", createdPolicy.AccessPolicy.GetName()), policy.AccessPolicy.GetName())

0 commit comments

Comments
 (0)