Skip to content

Commit 692d974

Browse files
author
Sophia Marie Terry
committed
Add tests for ignoreList
1 parent 1d6e1e4 commit 692d974

File tree

6 files changed

+84
-0
lines changed

6 files changed

+84
-0
lines changed

tools/spectral/ipa/__tests__/IPA104ValidOperationID.test.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,4 +145,18 @@ testRule('xgen-IPA-104-valid-operation-id', [
145145
},
146146
errors: [],
147147
},
148+
{
149+
name: 'valid method that needs ignoreList',
150+
document: {
151+
paths: {
152+
'/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/fts/indexes/{indexId} ': {
153+
get: {
154+
operationId: 'getGroupClusterFtsIndex',
155+
'x-xgen-operation-id-override': 'getClusterFtsIndex',
156+
},
157+
},
158+
},
159+
},
160+
errors: [],
161+
},
148162
]);

tools/spectral/ipa/__tests__/IPA105ValidOperationID.test.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,4 +136,18 @@ testRule('xgen-IPA-105-valid-operation-id', [
136136
},
137137
errors: [],
138138
},
139+
{
140+
name: 'valid method that needs ignoreList',
141+
document: {
142+
paths: {
143+
'/api/atlas/v2/groups/{groupId}/hosts/{processId}/fts/metrics': {
144+
get: {
145+
operationId: 'listGroupHostFtsMetrics',
146+
'x-xgen-operation-id-override': 'listHostFtsMetrics',
147+
},
148+
},
149+
},
150+
},
151+
errors: [],
152+
},
139153
]);

tools/spectral/ipa/__tests__/IPA106ValidOperationID.test.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,4 +168,18 @@ testRule('xgen-IPA-106-valid-operation-id', [
168168
},
169169
errors: [],
170170
},
171+
{
172+
name: 'valid method that needs ignoreList',
173+
document: {
174+
paths: {
175+
'/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/fts/indexes': {
176+
post: {
177+
operationId: 'createGroupClusterFtsIndex',
178+
'x-xgen-operation-id-override': 'createClusterFtsIndex',
179+
},
180+
},
181+
},
182+
},
183+
errors: [],
184+
},
171185
]);

tools/spectral/ipa/__tests__/IPA107ValidOperationID.test.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,4 +162,18 @@ testRule('xgen-IPA-107-valid-operation-id', [
162162
},
163163
errors: [],
164164
},
165+
{
166+
name: 'valid method that needs ignoreList',
167+
document: {
168+
paths: {
169+
'/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/fts/indexes/{indexId}': {
170+
put: {
171+
operationId: 'updateGroupClusterFtsIndex',
172+
'x-xgen-operation-id-override': 'updateClusterFtsIndex',
173+
},
174+
},
175+
},
176+
},
177+
errors: [],
178+
},
165179
]);

tools/spectral/ipa/__tests__/IPA108ValidOperationID.test.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,4 +167,18 @@ testRule('xgen-IPA-108-valid-operation-id', [
167167
},
168168
errors: [],
169169
},
170+
{
171+
name: 'valid method that needs ignoreList',
172+
document: {
173+
paths: {
174+
'/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/fts/indexes/{indexId}': {
175+
delete: {
176+
operationId: 'deleteGroupClusterFtsIndex',
177+
'x-xgen-operation-id-override': 'deleteClusterFtsIndex',
178+
},
179+
},
180+
},
181+
},
182+
errors: [],
183+
},
170184
]);

tools/spectral/ipa/__tests__/IPA109ValidOperationID.test.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,4 +137,18 @@ testRule('xgen-IPA-109-valid-operation-id', [
137137
},
138138
errors: [],
139139
},
140+
{
141+
name: 'valid method that needs ignoreList',
142+
document: {
143+
paths: {
144+
'/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/fts/indexes/{indexId}:test': {
145+
delete: {
146+
operationId: 'testGroupClusterFtsIndex',
147+
'x-xgen-operation-id-override': 'testClusterFtsIndex',
148+
},
149+
},
150+
},
151+
},
152+
errors: [],
153+
},
140154
]);

0 commit comments

Comments
 (0)