Skip to content

Commit 0ae1793

Browse files
author
Alice
committed
configured unit tests to load from separate files
1 parent d460d4a commit 0ae1793

File tree

3 files changed

+27
-26
lines changed

3 files changed

+27
-26
lines changed

src/__tests__/functions.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
firstLambda:
2+
handler: examples/firstLambda/index.handler
3+
name: TheFirstLambda

src/__tests__/serverless.yml

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -20,36 +20,12 @@ custom:
2020
FirstLambda: firstLambda
2121

2222
functions:
23-
firstLambda:
24-
handler: examples/firstLambda/index.handler
25-
name: TheFirstLambda
23+
- ${file(functions.yml)}
2624

2725
stepFunctions:
2826
stateMachines:
2927
foo:
3028
definition:
3129
Comment: "An example of the Amazon States Language using wait states"
3230
StartAt: FirstLambda
33-
States:
34-
FirstLambda:
35-
Type: Task
36-
Next: wait_using_seconds
37-
wait_using_seconds:
38-
Type: Wait
39-
Seconds: 2
40-
Next: wait_using_timestamp
41-
wait_using_timestamp:
42-
Type: Wait
43-
Timestamp: '2015-09-04T01:59:00Z'
44-
Next: wait_using_timestamp_path
45-
wait_using_timestamp_path:
46-
Type: Wait
47-
TimestampPath: "$.expirydate"
48-
Next: wait_using_seconds_path
49-
wait_using_seconds_path:
50-
Type: Wait
51-
SecondsPath: "$.expiryseconds"
52-
Next: FinalState
53-
FinalState:
54-
Type: Pass
55-
End: true
31+
States: ${file(states.yml)}

src/__tests__/states.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
FirstLambda:
2+
Type: Task
3+
Next: wait_using_seconds
4+
wait_using_seconds:
5+
Type: Wait
6+
Seconds: 2
7+
Next: wait_using_timestamp
8+
wait_using_timestamp:
9+
Type: Wait
10+
Timestamp: '2015-09-04T01:59:00Z'
11+
Next: wait_using_timestamp_path
12+
wait_using_timestamp_path:
13+
Type: Wait
14+
TimestampPath: "$.expirydate"
15+
Next: wait_using_seconds_path
16+
wait_using_seconds_path:
17+
Type: Wait
18+
SecondsPath: "$.expiryseconds"
19+
Next: FinalState
20+
FinalState:
21+
Type: Pass
22+
End: true

0 commit comments

Comments
 (0)