@@ -142,7 +142,7 @@ void kubectlDelete() throws KubectlException, ApiException {
142
142
.withStatus (201 )
143
143
.withBody (ADD_JOB )));
144
144
apiServer .stubFor (
145
- delete (urlPathEqualTo ("/apis/batch%2Fv1/batch%2Fv1 /namespaces/foo/jobs/bar" ))
145
+ delete (urlPathEqualTo ("/apis/batch/v1 /namespaces/foo/jobs/bar" ))
146
146
.inScenario ("JobDeletionScenario" )
147
147
.whenScenarioStateIs (Scenario .STARTED )
148
148
.willReturn (aResponse ()
@@ -153,7 +153,7 @@ void kubectlDelete() throws KubectlException, ApiException {
153
153
);
154
154
155
155
apiServer .stubFor (
156
- delete (urlPathEqualTo ("/apis/batch%2Fv1/batch%2Fv1 /namespaces/foo/jobs/bar" ))
156
+ delete (urlPathEqualTo ("/apis/batch/v1 /namespaces/foo/jobs/bar" ))
157
157
.inScenario ("JobDeletionScenario" )
158
158
.whenScenarioStateIs ("SecondCall" )
159
159
.willReturn (aResponse ()
@@ -204,7 +204,7 @@ void kubectlDelete() throws KubectlException, ApiException {
204
204
BatchV1Api api = new BatchV1Api ();
205
205
api .setApiClient (apiClient );
206
206
api .createNamespacedJob ("foo" , job ).execute ();
207
- ModelMapper .addModelMap (api . getAPIResources (). execute (). getGroupVersion (), job . getApiVersion () , job .getKind (), "jobs" , true , V1Job .class );
207
+ ModelMapper .addModelMap ("batch" , "v1" , job .getKind (), "jobs" , true , V1Job .class );
208
208
209
209
KubectlDelete <V1Job > kubectlDelete = Kubectl .delete (V1Job .class );
210
210
kubectlDelete .apiClient (apiClient );
@@ -215,7 +215,7 @@ void kubectlDelete() throws KubectlException, ApiException {
215
215
kubectlDelete .execute ();
216
216
apiServer .verify (
217
217
1 ,
218
- deleteRequestedFor (urlPathEqualTo ("/apis/batch%2Fv1/batch%2Fv1 /namespaces/foo/jobs/bar" ))
218
+ deleteRequestedFor (urlPathEqualTo ("/apis/batch/v1 /namespaces/foo/jobs/bar" ))
219
219
.withRequestBody (equalToJson ("{\" propagationPolicy\" : \" Foreground\" }" )));
220
220
assertThatThrownBy (() -> {
221
221
KubectlDelete <V1Job > kubectlDelete2 = Kubectl .delete (V1Job .class );
0 commit comments