Skip to content

Commit b22b18c

Browse files
committed
test(codegen): snapshot YAML + Mermaid graphs to keep codegen stable
1 parent 7e0329f commit b22b18c

20 files changed

Lines changed: 719 additions & 0 deletions
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
graph TD
2+
subgraph echo-name-flow
3+
external-echo[external-echo]
4+
extract-name[extract-name]
5+
name-shout[name-shout]
6+
external-echo --> extract-name
7+
extract-name --> name-shout
8+
end
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
graph TD
2+
subgraph echo-name-flow
3+
external-echo[external-echo]
4+
extract-name[extract-name]
5+
name-shout[name-shout]
6+
external-echo --> extract-name
7+
extract-name --> name-shout
8+
end
9+
subgraph joke-flow
10+
joke-fetch[joke-fetch]
11+
joke-split[joke-split]
12+
joke-rate[joke-rate]
13+
joke-fetch --> joke-split
14+
joke-split --> joke-rate
15+
end
16+
subgraph order-flow
17+
price-order[price-order]
18+
auth-payment[auth-payment]
19+
price-order --> auth-payment
20+
end
21+
subgraph payment-flow
22+
validate-cart[validate-cart]
23+
cart->psp[cart->psp]
24+
psp-charge[psp-charge]
25+
summarize-charge[summarize-charge]
26+
validate-cart --> cart->psp
27+
cart->psp --> psp-charge
28+
psp-charge --> summarize-charge
29+
end
30+
subgraph post-story-flow
31+
build-story[build-story]
32+
create-post[create-post]
33+
summarize-post[summarize-post]
34+
build-story --> create-post
35+
create-post --> summarize-post
36+
end
37+
subgraph user-signup
38+
hash-password[hash-password]
39+
draft->idp[draft->idp]
40+
idp-call[idp-call]
41+
persist-user[persist-user]
42+
hash-password --> draft->idp
43+
draft->idp --> idp-call
44+
idp-call --> persist-user
45+
end
46+
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
graph TD
2+
subgraph joke-flow
3+
joke-fetch[joke-fetch]
4+
joke-split[joke-split]
5+
joke-rate[joke-rate]
6+
joke-fetch --> joke-split
7+
joke-split --> joke-rate
8+
end
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
graph TD
2+
subgraph order-flow
3+
price-order[price-order]
4+
auth-payment[auth-payment]
5+
price-order --> auth-payment
6+
end
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
graph TD
2+
subgraph payment-flow
3+
validate-cart[validate-cart]
4+
cart->psp[cart->psp]
5+
psp-charge[psp-charge]
6+
summarize-charge[summarize-charge]
7+
validate-cart --> cart->psp
8+
cart->psp --> psp-charge
9+
psp-charge --> summarize-charge
10+
end
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
graph TD
2+
subgraph post-story-flow
3+
build-story[build-story]
4+
create-post[create-post]
5+
summarize-post[summarize-post]
6+
build-story --> create-post
7+
create-post --> summarize-post
8+
end
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
graph TD
2+
subgraph user-signup
3+
hash-password[hash-password]
4+
draft->idp[draft->idp]
5+
idp-call[idp-call]
6+
persist-user[persist-user]
7+
hash-password --> draft->idp
8+
draft->idp --> idp-call
9+
idp-call --> persist-user
10+
end
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
main:
2+
params:
3+
- payload
4+
steps:
5+
- call_cat-fact-fetch:
6+
call: http.get
7+
args:
8+
url: https://catfact.ninja/fact
9+
body: ${payload}
10+
headers:
11+
X-Workflow-Name: ${sys.get_env("GOOGLE_CLOUD_WORKFLOW_ID")}
12+
Content-Type: application/json
13+
result: res_0
14+
- set_payload_0:
15+
assign:
16+
- payload: ${res_0.body}
17+
- capture_run_id_0:
18+
assign:
19+
- run_id: ${res_0.headers["X-Workflow-Run-Id"]}
20+
- call_cat-fact-summarize:
21+
call: http.post
22+
args:
23+
url: ${sys.get_env("BASE_URL") + "/steps/cat-fact-summarize"}
24+
body: ${payload}
25+
headers:
26+
X-Workflow-Name: ${sys.get_env("GOOGLE_CLOUD_WORKFLOW_ID")}
27+
X-Workflow-Run-Id: ${run_id}
28+
Content-Type: application/json
29+
auth:
30+
type: OIDC
31+
audience: ${sys.get_env("BASE_URL")}
32+
result: res_1
33+
- set_payload_1:
34+
assign:
35+
- payload: ${res_1.body}
36+
- return_final:
37+
return: ${payload}
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
main:
2+
params:
3+
- payload
4+
steps:
5+
- call_dad-joke-fetch:
6+
call: http.get
7+
args:
8+
url: https://icanhazdadjoke.com/
9+
body: ${payload}
10+
headers:
11+
X-Workflow-Name: ${sys.get_env("GOOGLE_CLOUD_WORKFLOW_ID")}
12+
Content-Type: application/json
13+
Accept: application/json
14+
result: res_0
15+
- set_payload_0:
16+
assign:
17+
- payload: ${res_0.body}
18+
- capture_run_id_0:
19+
assign:
20+
- run_id: ${res_0.headers["X-Workflow-Run-Id"]}
21+
- assign_1:
22+
assign:
23+
- payload:
24+
setup: ${payload.joke[:int(len(payload.joke)/2)]}
25+
punch: ${payload.joke[int(len(payload.joke)/2):]}
26+
- call_dad-joke-rate:
27+
call: http.post
28+
args:
29+
url: ${sys.get_env("BASE_URL") + "/steps/dad-joke-rate"}
30+
body: ${payload}
31+
headers:
32+
X-Workflow-Name: ${sys.get_env("GOOGLE_CLOUD_WORKFLOW_ID")}
33+
X-Workflow-Run-Id: ${run_id}
34+
Content-Type: application/json
35+
auth:
36+
type: OIDC
37+
audience: ${sys.get_env("BASE_URL")}
38+
result: res_2
39+
- set_payload_2:
40+
assign:
41+
- payload: ${res_2.body}
42+
- return_final:
43+
return: ${payload}
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
main:
2+
params:
3+
- payload
4+
steps:
5+
- call_external-echo:
6+
call: http.post
7+
args:
8+
url: ${sys.get_env("ECHO_URL")}
9+
body: ${payload}
10+
headers:
11+
X-Workflow-Name: ${sys.get_env("GOOGLE_CLOUD_WORKFLOW_ID")}
12+
Content-Type: application/json
13+
result: res_0
14+
- set_payload_0:
15+
assign:
16+
- payload: ${res_0.body}
17+
- call_extract-name:
18+
call: http.post
19+
args:
20+
url: ${sys.get_env("BASE_URL") + "/steps/extract-name"}
21+
body: ${payload}
22+
headers:
23+
X-Workflow-Name: ${sys.get_env("GOOGLE_CLOUD_WORKFLOW_ID")}
24+
Content-Type: application/json
25+
auth:
26+
type: OIDC
27+
audience: ${sys.get_env("BASE_URL")}
28+
result: res_1
29+
- set_payload_1:
30+
assign:
31+
- payload: ${res_1.body}
32+
- capture_run_id_1:
33+
assign:
34+
- run_id: ${res_1.headers["X-Workflow-Run-Id"]}
35+
- call_name-shout:
36+
call: http.post
37+
args:
38+
url: ${sys.get_env("BASE_URL") + "/steps/name-shout"}
39+
body: ${payload}
40+
headers:
41+
X-Workflow-Name: ${sys.get_env("GOOGLE_CLOUD_WORKFLOW_ID")}
42+
X-Workflow-Run-Id: ${run_id}
43+
Content-Type: application/json
44+
auth:
45+
type: OIDC
46+
audience: ${sys.get_env("BASE_URL")}
47+
result: res_2
48+
- set_payload_2:
49+
assign:
50+
- payload: ${res_2.body}
51+
- return_final:
52+
return: ${payload}

0 commit comments

Comments
 (0)