Skip to content

Commit 61cd3ca

Browse files
committed
[Fix #1002] Moving test files
Signed-off-by: fjtirado <[email protected]>
1 parent 5430303 commit 61cd3ca

File tree

29 files changed

+59
-26
lines changed

29 files changed

+59
-26
lines changed

impl/test/src/test/java/io/serverlessworkflow/impl/test/OAuthHTTPWorkflowDefinitionTest.java

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,8 @@ public void testOAuthClientSecretPostPasswordWorkflowExecution() throws Exceptio
102102
.setResponseCode(200));
103103

104104
Workflow workflow =
105-
readWorkflowFromClasspath("workflows-samples/oAuthClientSecretPostPasswordHttpCall.yaml");
105+
readWorkflowFromClasspath(
106+
"workflows-samples/oauth2/oAuthClientSecretPostPasswordHttpCall.yaml");
106107
Map<String, Object> result =
107108
app.workflowDefinition(workflow).instance(Map.of()).start().get().asMap().orElseThrow();
108109

@@ -144,7 +145,7 @@ public void testOAuthClientSecretPostWithArgsWorkflowExecution() throws Exceptio
144145

145146
Workflow workflow =
146147
readWorkflowFromClasspath(
147-
"workflows-samples/oAuthClientSecretPostPasswordAsArgHttpCall.yaml");
148+
"workflows-samples/oauth2/oAuthClientSecretPostPasswordAsArgHttpCall.yaml");
148149

149150
Map<String, String> params =
150151
Map.of(
@@ -194,7 +195,7 @@ public void testOAuthClientSecretPostWithArgsNoEndPointWorkflowExecution() throw
194195

195196
Workflow workflow =
196197
readWorkflowFromClasspath(
197-
"workflows-samples/oAuthClientSecretPostPasswordNoEndpointsHttpCall.yaml");
198+
"workflows-samples/oauth2/oAuthClientSecretPostPasswordNoEndpointsHttpCall.yaml");
198199

199200
Map<String, String> params =
200201
Map.of(
@@ -244,7 +245,7 @@ public void testOAuthClientSecretPostWithArgsAllGrantsWorkflowExecution() throws
244245

245246
Workflow workflow =
246247
readWorkflowFromClasspath(
247-
"workflows-samples/oAuthClientSecretPostPasswordAllGrantsHttpCall.yaml");
248+
"workflows-samples/oauth2/oAuthClientSecretPostPasswordAllGrantsHttpCall.yaml");
248249
Map<String, String> params =
249250
Map.of(
250251
"clientId", "serverless-workflow",
@@ -301,7 +302,7 @@ public void testOAuthClientSecretPostClientCredentialsWorkflowExecution() throws
301302

302303
Workflow workflow =
303304
readWorkflowFromClasspath(
304-
"workflows-samples/oAuthClientSecretPostClientCredentialsHttpCall.yaml");
305+
"workflows-samples/oauth2/oAuthClientSecretPostClientCredentialsHttpCall.yaml");
305306
Map<String, Object> result =
306307
app.workflowDefinition(workflow).instance(Map.of()).start().get().asMap().orElseThrow();
307308

@@ -344,7 +345,7 @@ public void testOAuthClientSecretPostClientCredentialsParamsWorkflowExecution()
344345

345346
Workflow workflow =
346347
readWorkflowFromClasspath(
347-
"workflows-samples/oAuthClientSecretPostClientCredentialsParamsHttpCall.yaml");
348+
"workflows-samples/oauth2/oAuthClientSecretPostClientCredentialsParamsHttpCall.yaml");
348349
Map<String, String> params =
349350
Map.of(
350351
"clientId", "serverless-workflow",
@@ -393,7 +394,7 @@ public void testOAuthClientSecretPostClientCredentialsParamsNoEndpointWorkflowEx
393394

394395
Workflow workflow =
395396
readWorkflowFromClasspath(
396-
"workflows-samples/oAuthClientSecretPostClientCredentialsParamsNoEndPointHttpCall.yaml");
397+
"workflows-samples/oauth2/oAuthClientSecretPostClientCredentialsParamsNoEndPointHttpCall.yaml");
397398
Map<String, String> params =
398399
Map.of(
399400
"clientId", "serverless-workflow",
@@ -439,7 +440,7 @@ public void testOAuthJSONPasswordWorkflowExecution() throws Exception {
439440
.setResponseCode(200));
440441

441442
Workflow workflow =
442-
readWorkflowFromClasspath("workflows-samples/oAuthJSONPasswordHttpCall.yaml");
443+
readWorkflowFromClasspath("workflows-samples/oauth2/oAuthJSONPasswordHttpCall.yaml");
443444
Map<String, Object> result =
444445
app.workflowDefinition(workflow).instance(Map.of()).start().get().asMap().orElseThrow();
445446

@@ -494,7 +495,7 @@ public void testOAuthJSONWithArgsWorkflowExecution() throws Exception {
494495
.setResponseCode(200));
495496

496497
Workflow workflow =
497-
readWorkflowFromClasspath("workflows-samples/oAuthJSONPasswordAsArgHttpCall.yaml");
498+
readWorkflowFromClasspath("workflows-samples/oauth2/oAuthJSONPasswordAsArgHttpCall.yaml");
498499
Map<String, String> params =
499500
Map.of(
500501
"clientId", "serverless-workflow",
@@ -553,7 +554,8 @@ public void testOAuthJSONWithArgsNoEndPointWorkflowExecution() throws Exception
553554
.setResponseCode(200));
554555

555556
Workflow workflow =
556-
readWorkflowFromClasspath("workflows-samples/oAuthJSONPasswordNoEndpointsHttpCall.yaml");
557+
readWorkflowFromClasspath(
558+
"workflows-samples/oauth2/oAuthJSONPasswordNoEndpointsHttpCall.yaml");
557559
Map<String, String> params =
558560
Map.of(
559561
"clientId", "serverless-workflow",
@@ -611,7 +613,8 @@ public void testOAuthJSONWithArgsAllGrantsWorkflowExecution() throws Exception {
611613
.setResponseCode(200));
612614

613615
Workflow workflow =
614-
readWorkflowFromClasspath("workflows-samples/oAuthJSONPasswordAllGrantsHttpCall.yaml");
616+
readWorkflowFromClasspath(
617+
"workflows-samples/oauth2/oAuthJSONPasswordAllGrantsHttpCall.yaml");
615618
Map<String, String> params =
616619
Map.of(
617620
"clientId", "serverless-workflow",
@@ -683,7 +686,8 @@ public void testOAuthJSONClientCredentialsWorkflowExecution() throws Exception {
683686
.setResponseCode(200));
684687

685688
Workflow workflow =
686-
readWorkflowFromClasspath("workflows-samples/oAuthJSONClientCredentialsHttpCall.yaml");
689+
readWorkflowFromClasspath(
690+
"workflows-samples/oauth2/oAuthJSONClientCredentialsHttpCall.yaml");
687691
Map<String, Object> result =
688692
app.workflowDefinition(workflow).instance(Map.of()).start().get().asMap().orElseThrow();
689693

@@ -731,7 +735,7 @@ public void testOAuthJSONClientCredentialsParamsWorkflowExecution() throws Excep
731735

732736
Workflow workflow =
733737
readWorkflowFromClasspath(
734-
"workflows-samples/oAuthJSONClientCredentialsParamsHttpCall.yaml");
738+
"workflows-samples/oauth2/oAuthJSONClientCredentialsParamsHttpCall.yaml");
735739
Map<String, String> params =
736740
Map.of(
737741
"clientId", "serverless-workflow",
@@ -784,7 +788,7 @@ public void testOAuthJSONClientCredentialsParamsNoEndpointWorkflowExecution() th
784788

785789
Workflow workflow =
786790
readWorkflowFromClasspath(
787-
"workflows-samples/oAuthJSONClientCredentialsParamsNoEndPointHttpCall.yaml");
791+
"workflows-samples/oauth2/oAuthJSONClientCredentialsParamsNoEndPointHttpCall.yaml");
788792
Map<String, String> params =
789793
Map.of(
790794
"clientId", "serverless-workflow",

impl/test/src/test/java/io/serverlessworkflow/impl/test/OpenIDCHTTPWorkflowDefinitionTest.java

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,8 @@ public void testOpenIDCClientSecretPostPasswordWorkflowExecution() throws Except
103103
.setResponseCode(200));
104104

105105
Workflow workflow =
106-
readWorkflowFromClasspath("workflows-samples/openidcClientSecretPostPasswordHttpCall.yaml");
106+
readWorkflowFromClasspath(
107+
"workflows-samples/openid/openidcClientSecretPostPasswordHttpCall.yaml");
107108
Map<String, Object> result =
108109
app.workflowDefinition(workflow).instance(Map.of()).start().get().asMap().orElseThrow();
109110

@@ -148,7 +149,7 @@ public void testOpenIDCClientSecretPostWithArgsWorkflowExecution() throws Except
148149

149150
Workflow workflow =
150151
readWorkflowFromClasspath(
151-
"workflows-samples/openidcClientSecretPostPasswordAsArgHttpCall.yaml");
152+
"workflows-samples/openid/openidcClientSecretPostPasswordAsArgHttpCall.yaml");
152153
Map<String, String> params =
153154
Map.of(
154155
"clientId", "serverless-workflow",
@@ -199,7 +200,7 @@ public void testOpenIDCClientSecretPostWithArgsAllGrantsWorkflowExecution() thro
199200

200201
Workflow workflow =
201202
readWorkflowFromClasspath(
202-
"workflows-samples/openidcClientSecretPostPasswordAllGrantsHttpCall.yaml");
203+
"workflows-samples/openid/openidcClientSecretPostPasswordAllGrantsHttpCall.yaml");
203204
Map<String, String> params =
204205
Map.of(
205206
"clientId", "serverless-workflow",
@@ -258,7 +259,7 @@ public void testOpenIDCClientSecretPostClientCredentialsParamsWorkflowExecution(
258259

259260
Workflow workflow =
260261
readWorkflowFromClasspath(
261-
"workflows-samples/openidcClientSecretPostClientCredentialsParamsHttpCall.yaml");
262+
"workflows-samples/openid/openidcClientSecretPostClientCredentialsParamsHttpCall.yaml");
262263
Map<String, String> params =
263264
Map.of(
264265
"clientId", "serverless-workflow",
@@ -307,7 +308,7 @@ public void testOpenIDCClientSecretPostClientCredentialsParamsNoEndpointWorkflow
307308

308309
Workflow workflow =
309310
readWorkflowFromClasspath(
310-
"workflows-samples/openidcClientSecretPostClientCredentialsParamsNoEndPointHttpCall.yaml");
311+
"workflows-samples/openid/openidcClientSecretPostClientCredentialsParamsNoEndPointHttpCall.yaml");
311312
Map<String, String> params =
312313
Map.of(
313314
"clientId", "serverless-workflow",
@@ -352,7 +353,7 @@ public void testOpenIDCJSONPasswordWorkflowExecution() throws Exception {
352353
.setResponseCode(200));
353354

354355
Workflow workflow =
355-
readWorkflowFromClasspath("workflows-samples/openidcJSONPasswordHttpCall.yaml");
356+
readWorkflowFromClasspath("workflows-samples/openid/openidcJSONPasswordHttpCall.yaml");
356357
Map<String, Object> result =
357358
app.workflowDefinition(workflow).instance(Map.of()).start().get().asMap().orElseThrow();
358359

@@ -407,7 +408,7 @@ public void testOpenIDCJSONWithArgsWorkflowExecution() throws Exception {
407408
.setResponseCode(200));
408409

409410
Workflow workflow =
410-
readWorkflowFromClasspath("workflows-samples/openidcJSONPasswordAsArgHttpCall.yaml");
411+
readWorkflowFromClasspath("workflows-samples/openid/openidcJSONPasswordAsArgHttpCall.yaml");
411412
Map<String, String> params =
412413
Map.of(
413414
"clientId", "serverless-workflow",
@@ -466,7 +467,8 @@ public void testOpenIDCJSONWithArgsNoEndPointWorkflowExecution() throws Exceptio
466467
.setResponseCode(200));
467468

468469
Workflow workflow =
469-
readWorkflowFromClasspath("workflows-samples/openidcJSONPasswordNoEndpointsHttpCall.yaml");
470+
readWorkflowFromClasspath(
471+
"workflows-samples/openid/openidcJSONPasswordNoEndpointsHttpCall.yaml");
470472
Map<String, String> params =
471473
Map.of(
472474
"clientId", "serverless-workflow",
@@ -524,7 +526,8 @@ public void testOpenIDCJSONWithArgsAllGrantsWorkflowExecution() throws Exception
524526
.setResponseCode(200));
525527

526528
Workflow workflow =
527-
readWorkflowFromClasspath("workflows-samples/openidcJSONPasswordAllGrantsHttpCall.yaml");
529+
readWorkflowFromClasspath(
530+
"workflows-samples/openid/openidcJSONPasswordAllGrantsHttpCall.yaml");
528531
Map<String, String> params =
529532
Map.of(
530533
"clientId", "serverless-workflow",
@@ -596,7 +599,8 @@ public void testOpenIDCJSONClientCredentialsWorkflowExecution() throws Exception
596599
.setResponseCode(200));
597600

598601
Workflow workflow =
599-
readWorkflowFromClasspath("workflows-samples/openidcJSONClientCredentialsHttpCall.yaml");
602+
readWorkflowFromClasspath(
603+
"workflows-samples/openid/openidcJSONClientCredentialsHttpCall.yaml");
600604
Map<String, Object> result =
601605
app.workflowDefinition(workflow).instance(Map.of()).start().get().asMap().orElseThrow();
602606

@@ -644,7 +648,7 @@ public void testOpenIDCJSONClientCredentialsParamsWorkflowExecution() throws Exc
644648

645649
Workflow workflow =
646650
readWorkflowFromClasspath(
647-
"workflows-samples/openidcJSONClientCredentialsParamsHttpCall.yaml");
651+
"workflows-samples/openid/openidcJSONClientCredentialsParamsHttpCall.yaml");
648652
Map<String, String> params =
649653
Map.of(
650654
"clientId", "serverless-workflow",
@@ -697,7 +701,7 @@ public void testOpenIDCJSONClientCredentialsParamsNoEndpointWorkflowExecution()
697701

698702
Workflow workflow =
699703
readWorkflowFromClasspath(
700-
"workflows-samples/openidcJSONClientCredentialsParamsNoEndPointHttpCall.yaml");
704+
"workflows-samples/openid/openidcJSONClientCredentialsParamsNoEndPointHttpCall.yaml");
701705
Map<String, String> params =
702706
Map.of(
703707
"clientId", "serverless-workflow",
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
document:
2+
dsl: '1.0.1'
3+
namespace: samples
4+
name: call-custom-function-inline
5+
version: '0.1.0'
6+
use:
7+
functions:
8+
getPetById:
9+
input:
10+
schema:
11+
document:
12+
type: object
13+
properties:
14+
petId:
15+
type: string
16+
required: [ petId ]
17+
call: http
18+
with:
19+
method: get
20+
endpoint: https://petstore.swagger.io/v2/pet/{petId}
21+
do:
22+
- getPet:
23+
call: getPetById
24+
with:
25+
petId: 69

0 commit comments

Comments
 (0)