Skip to content

Commit 96f36a9

Browse files
vinod-ship-itclaude
andcommitted
Regenerate SDK: enable 3 previously skipped Fetch tests
ApplicationOverrideRules, NATRules, and OCSPResponders Fetch tests now pass with server-side name filtering. Generated from openapi-integration-creator commit 2ce0414. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 369e341 commit 96f36a9

File tree

3 files changed

+8
-18
lines changed

3 files changed

+8
-18
lines changed

generated/identity_services/test/api_ocsp_responders_test.go

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,6 @@ func Test_identity_services_OCSPRespondersAPIService_DeleteByID(t *testing.T) {
200200

201201
// Test_identity_services_OCSPRespondersAPIService_FetchOCSPResponders tests the FetchOCSPResponders convenience method
202202
func Test_identity_services_OCSPRespondersAPIService_FetchOCSPResponders(t *testing.T) {
203-
t.Skip("Create returns no model and List fails with deserialization error - cannot retrieve created object ID")
204203
// Setup the authenticated client
205204
client := SetupIdentitySvcTestClient(t)
206205

@@ -220,20 +219,7 @@ func Test_identity_services_OCSPRespondersAPIService_FetchOCSPResponders(t *test
220219
}
221220
require.NoError(t, err, "Failed to create test object for fetch test")
222221

223-
// Get the ID from list
224-
listRes, _, errList := client.OCSPRespondersAPI.ListOCSPResponders(context.Background()).Folder("Prisma Access").Name(testName).Execute()
225-
require.NoError(t, errList, "Failed to list OCSP Responders")
226-
require.Greater(t, len(listRes.Data), 0, "Should have at least one OCSP responder")
227-
createdID := listRes.Data[0].Id
228-
229-
// Cleanup after test
230-
defer func() {
231-
deleteReq := client.OCSPRespondersAPI.DeleteOCSPRespondersByID(context.Background(), createdID)
232-
_, _ = deleteReq.Execute()
233-
t.Logf("Cleaned up test object: %s", createdID)
234-
}()
235-
236-
// Test 1: Fetch existing object by name
222+
// Test 1: Fetch existing object by name (also used to get ID for cleanup)
237223
fetchedObj, err := client.OCSPRespondersAPI.FetchOCSPResponders(
238224
context.Background(),
239225
testName,
@@ -245,10 +231,16 @@ func Test_identity_services_OCSPRespondersAPIService_FetchOCSPResponders(t *test
245231
// Verify successful fetch
246232
require.NoError(t, err, "Failed to fetch ocsp_responders by name")
247233
require.NotNil(t, fetchedObj, "Fetched object should not be nil")
248-
assert.Equal(t, createdID, fetchedObj.Id, "Fetched object ID should match")
249234
assert.Equal(t, testName, fetchedObj.Name, "Fetched object name should match")
250235
t.Logf("[SUCCESS] FetchOCSPResponders found object: %s", fetchedObj.Name)
251236

237+
// Cleanup after test using ID from fetch
238+
defer func() {
239+
deleteReq := client.OCSPRespondersAPI.DeleteOCSPRespondersByID(context.Background(), fetchedObj.Id)
240+
_, _ = deleteReq.Execute()
241+
t.Logf("Cleaned up test object: %s", fetchedObj.Id)
242+
}()
243+
252244
// Test 2: Fetch non-existent object (should return nil, nil)
253245
notFound, err := client.OCSPRespondersAPI.FetchOCSPResponders(
254246
context.Background(),

generated/network_services/test/api_nat_rules_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,6 @@ func Test_network_services_NATRulesAPIService_DeleteByID(t *testing.T) {
204204

205205
// Test_network_services_NATRulesAPIService_FetchNATRules tests the FetchNATRules convenience method
206206
func Test_network_services_NATRulesAPIService_FetchNATRules(t *testing.T) {
207-
t.Skip("Fetch internally calls List which fails deserializing existing NAT rules with missing required properties - spec/model issue")
208207
// Setup the authenticated client
209208
client := SetupNetworkSvcTestClient(t)
210209

generated/security_services/test/api_app_override_rules_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,6 @@ func Test_security_services_ApplicationOverrideRulesAPIService_Move(t *testing.T
265265

266266
// Test_security_services_ApplicationOverrideRulesAPIService_FetchApplicationOverrideRules tests the FetchApplicationOverrideRules convenience method
267267
func Test_security_services_ApplicationOverrideRulesAPIService_FetchApplicationOverrideRules(t *testing.T) {
268-
t.Skip("Fetch internally calls List which fails with deserialization error - no value given for required property application")
269268
client := SetupSecuritySvcTestClient(t)
270269

271270
// Create a test object first

0 commit comments

Comments
 (0)