Skip to content

Commit 5abfe4d

Browse files
test: update ctk
Signed-off-by: Matthias Pichler <[email protected]>
1 parent 28742a5 commit 5abfe4d

File tree

10 files changed

+244
-244
lines changed

10 files changed

+244
-244
lines changed

ctk/features/call.feature

Lines changed: 44 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ Feature: Call Task
1515
namespace: default
1616
name: http-call-with-content-output
1717
do:
18-
getFirstAvailablePet:
19-
call: http
20-
with:
21-
method: get
22-
endpoint:
23-
uri: https://petstore.swagger.io/v2/pet/findByStatus?status={status}
24-
output:
25-
from: .[0]
18+
- getFirstAvailablePet:
19+
call: http
20+
with:
21+
method: get
22+
endpoint:
23+
uri: https://petstore.swagger.io/v2/pet/findByStatus?status={status}
24+
output:
25+
from: .[0]
2626
"""
2727
And given the workflow input is:
2828
"""yaml
@@ -43,13 +43,13 @@ Feature: Call Task
4343
namespace: default
4444
name: http-call-with-response-output
4545
do:
46-
getPetById:
47-
call: http
48-
with:
49-
method: get
50-
endpoint:
51-
uri: https://petstore.swagger.io/v2/pet/{petId}
52-
output: response
46+
- getPetById:
47+
call: http
48+
with:
49+
method: get
50+
endpoint:
51+
uri: https://petstore.swagger.io/v2/pet/{petId}
52+
output: response
5353
"""
5454
And given the workflow input is:
5555
"""yaml
@@ -70,16 +70,16 @@ Feature: Call Task
7070
namespace: default
7171
name: http-call-with-basic-auth
7272
do:
73-
getSecuredEndpoint:
74-
call: http
75-
with:
76-
method: get
77-
endpoint:
78-
uri: https://httpbin.org/basic-auth/{username}/{password}
79-
authentication:
80-
basic:
81-
username: ${ .username }
82-
password: ${ .password }
73+
- getSecuredEndpoint:
74+
call: http
75+
with:
76+
method: get
77+
endpoint:
78+
uri: https://httpbin.org/basic-auth/{username}/{password}
79+
authentication:
80+
basic:
81+
username: ${ .username }
82+
password: ${ .password }
8383
"""
8484
And given the workflow input is:
8585
"""yaml
@@ -99,16 +99,16 @@ Feature: Call Task
9999
namespace: default
100100
name: openapi-call-with-content-output
101101
do:
102-
getPetsByStatus:
103-
call: openapi
104-
with:
105-
document:
106-
uri: https://petstore.swagger.io/v2/swagger.json
107-
operation: findPetsByStatus
108-
parameters:
109-
status: ${ .status }
110-
output:
111-
from: . | length
102+
- getPetsByStatus:
103+
call: openapi
104+
with:
105+
document:
106+
uri: https://petstore.swagger.io/v2/swagger.json
107+
operation: findPetsByStatus
108+
parameters:
109+
status: ${ .status }
110+
output:
111+
from: . | length
112112
"""
113113
And given the workflow input is:
114114
"""yaml
@@ -127,15 +127,15 @@ Feature: Call Task
127127
namespace: default
128128
name: openapi-call-with-response-output
129129
do:
130-
getPetById:
131-
call: openapi
132-
with:
133-
document:
134-
uri: https://petstore.swagger.io/v2/swagger.json
135-
operation: getPetById
136-
parameters:
137-
petId: ${ .petId }
138-
output: response
130+
- getPetById:
131+
call: openapi
132+
with:
133+
document:
134+
uri: https://petstore.swagger.io/v2/swagger.json
135+
operation: getPetById
136+
parameters:
137+
petId: ${ .petId }
138+
output: response
139139
"""
140140
And given the workflow input is:
141141
"""yaml

ctk/features/composite.feature

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,18 @@ Feature: Composite Task
1212
namespace: default
1313
name: composite-sequential
1414
do:
15-
setRGB:
16-
execute:
17-
sequentially:
18-
setRed:
19-
set:
20-
colors: ${ .colors + ["red"] }
21-
setGreen:
22-
set:
23-
colors: ${ .colors + ["green"] }
24-
setBlue:
25-
set:
26-
colors: ${ .colors + ["blue"] }
15+
- setRGB:
16+
execute:
17+
sequentially:
18+
- setRed:
19+
set:
20+
colors: ${ .colors + ["red"] }
21+
- setGreen:
22+
set:
23+
colors: ${ .colors + ["green"] }
24+
- setBlue:
25+
set:
26+
colors: ${ .colors + ["blue"] }
2727
"""
2828
When the workflow is executed
2929
Then the workflow should complete with output:
@@ -40,19 +40,19 @@ Feature: Composite Task
4040
namespace: default
4141
name: composite-sequential
4242
do:
43-
setRGB:
44-
execute:
45-
concurrently:
46-
setRed:
47-
set:
48-
colors: ${ .colors + ["red"] }
49-
setGreen:
50-
set:
51-
colors: ${ .colors + ["green"] }
52-
setBlue:
53-
set:
54-
colors: ${ .colors + ["blue"] }
55-
compete: true
43+
- setRGB:
44+
execute:
45+
concurrently:
46+
- setRed:
47+
set:
48+
colors: ${ .colors + ["red"] }
49+
- setGreen:
50+
set:
51+
colors: ${ .colors + ["green"] }
52+
- setBlue:
53+
set:
54+
colors: ${ .colors + ["blue"] }
55+
compete: true
5656
"""
5757
When the workflow is executed
5858
Then the workflow should complete

ctk/features/data-flow.feature

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ Feature: Data Flow
1212
namespace: default
1313
name: output-filtering
1414
do:
15-
setUsername:
16-
input:
17-
from: .user.claims.subject #filters the input of the task, using only the user's subject
18-
set:
19-
playerId: ${ . }
15+
- setUsername:
16+
input:
17+
from: .user.claims.subject #filters the input of the task, using only the user's subject
18+
set:
19+
playerId: ${ . }
2020
"""
2121
And given the workflow input is:
2222
"""yaml
@@ -39,14 +39,14 @@ Feature: Data Flow
3939
namespace: default
4040
name: output-filtering
4141
do:
42-
getPetById:
43-
call: http
44-
with:
45-
method: get
46-
endpoint:
47-
uri: https://petstore.swagger.io/v2/pet/{petId} #simple interpolation, only possible with top level variables
48-
output:
49-
from: .id #filters the output of the http call, using only the id of the returned object
42+
- getPetById:
43+
call: http
44+
with:
45+
method: get
46+
endpoint:
47+
uri: https://petstore.swagger.io/v2/pet/{petId} #simple interpolation, only possible with top level variables
48+
output:
49+
from: .id #filters the output of the http call, using only the id of the returned object
5050
"""
5151
And given the workflow input is:
5252
"""yaml
@@ -67,22 +67,22 @@ Feature: Data Flow
6767
namespace: default
6868
name: non-object-output
6969
do:
70-
getPetById1:
71-
call: http
72-
with:
73-
method: get
74-
endpoint:
75-
uri: https://petstore.swagger.io/v2/pet/{petId} #simple interpolation, only possible with top level variables
76-
output:
77-
from: .id
78-
getPetById2:
79-
call: http
80-
with:
81-
method: get
82-
endpoint:
83-
uri: https://petstore.swagger.io/v2/pet/2
84-
output:
85-
from: '{ ids: [ $input, .id ] }'
70+
- getPetById1:
71+
call: http
72+
with:
73+
method: get
74+
endpoint:
75+
uri: https://petstore.swagger.io/v2/pet/{petId} #simple interpolation, only possible with top level variables
76+
output:
77+
from: .id
78+
- getPetById2:
79+
call: http
80+
with:
81+
method: get
82+
endpoint:
83+
uri: https://petstore.swagger.io/v2/pet/2
84+
output:
85+
from: '{ ids: [ $input, .id ] }'
8686
"""
8787
When the workflow is executed
8888
Then the workflow should complete with output:

ctk/features/emit.feature

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ Feature: Emit Task
1212
namespace: default
1313
name: emit
1414
do:
15-
emitUserGreeted:
16-
emit:
17-
event:
18-
with:
19-
source: https://fake-source.com
20-
type: com.fake-source.user.greeted.v1
21-
data:
22-
greetings: ${ "Hello \(.user.firstName) \(.user.lastName)!" }
15+
- emitUserGreeted:
16+
emit:
17+
event:
18+
with:
19+
source: https://fake-source.com
20+
type: com.fake-source.user.greeted.v1
21+
data:
22+
greetings: ${ "Hello \(.user.firstName) \(.user.lastName)!" }
2323
"""
2424
And given the workflow input is:
2525
"""yaml

ctk/features/flow.feature

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ Feature: Flow Directive
1111
namespace: default
1212
name: implicit-sequence
1313
do:
14-
setRed:
15-
set:
16-
colors: '${ .colors + [ "red" ] }'
17-
setGreen:
18-
set:
19-
colors: '${ .colors + [ "green" ] }'
20-
setBlue:
21-
set:
22-
colors: '${ .colors + [ "blue" ] }'
14+
- setRed:
15+
set:
16+
colors: '${ .colors + [ "red" ] }'
17+
- setGreen:
18+
set:
19+
colors: '${ .colors + [ "green" ] }'
20+
- setBlue:
21+
set:
22+
colors: '${ .colors + [ "blue" ] }'
2323
"""
2424
When the workflow is executed
2525
Then the workflow should complete with output:
@@ -38,18 +38,18 @@ Feature: Flow Directive
3838
namespace: default
3939
name: explicit-sequence
4040
do:
41-
setRed:
42-
set:
43-
colors: '${ .colors + [ "red" ] }'
44-
then: setGreen
45-
setBlue:
46-
set:
47-
colors: '${ .colors + [ "blue" ] }'
48-
then: end
49-
setGreen:
50-
set:
51-
colors: '${ .colors + [ "green" ] }'
52-
then: setBlue
41+
- setRed:
42+
set:
43+
colors: '${ .colors + [ "red" ] }'
44+
then: setGreen
45+
- setBlue:
46+
set:
47+
colors: '${ .colors + [ "blue" ] }'
48+
then: end
49+
- setGreen:
50+
set:
51+
colors: '${ .colors + [ "green" ] }'
52+
then: setBlue
5353
"""
5454
When the workflow is executed
5555
Then the workflow should complete with output:

ctk/features/for.feature

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ Feature: For Task
1414
namespace: default
1515
name: for
1616
do:
17-
forEachColor:
18-
for:
19-
each: color
20-
in: '.colors'
21-
do:
22-
set:
23-
processed: '${ { colors: (.processed.colors + [ $color ]), indexes: (.processed.indexes + [ $index ])} }'
17+
- forEachColor:
18+
for:
19+
each: color
20+
in: '.colors'
21+
do:
22+
set:
23+
processed: '${ { colors: (.processed.colors + [ $color ]), indexes: (.processed.indexes + [ $index ])} }'
2424
"""
2525
And given the workflow input is:
2626
"""yaml

ctk/features/raise.feature

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ Feature: Raise Task
1111
namespace: default
1212
name: raise-custom-error
1313
do:
14-
raiseComplianceError:
15-
raise:
16-
error:
17-
status: 400
18-
type: https://serverlessworkflow.io/errors/types/compliance
19-
title: Compliance Error
14+
- raiseComplianceError:
15+
raise:
16+
error:
17+
status: 400
18+
type: https://serverlessworkflow.io/errors/types/compliance
19+
title: Compliance Error
2020
"""
2121
When the workflow is executed
2222
Then the workflow should fault with error:

0 commit comments

Comments
 (0)