File tree Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -89,6 +89,8 @@ RUN --mount=type=ssh source /.venv/bin/activate \
89
89
&& chmod a+x /docker-entrypoint.sh \
90
90
&& true
91
91
92
+ RUN mkdir -p /opt/templates \
93
+ && curl -L https://github.com/pvarki/rune-fake-metadata/releases/latest/download/rune.json -o /opt/templates/rune-fake.json
92
94
93
95
# ########################
94
96
# Main production build #
@@ -122,6 +124,8 @@ RUN --mount=type=ssh apt-get update && apt-get install -y \
122
124
&& true
123
125
ENTRYPOINT ["/usr/bin/tini" , "--" , "/docker-entrypoint.sh" ]
124
126
127
+ RUN mkdir -p /opt/templates \
128
+ && curl -L https://github.com/pvarki/rune-fake-metadata/releases/latest/download/rune.json -o /opt/templates/rune-fake.json
125
129
126
130
# ####################################
127
131
# Base stage for development builds #
@@ -133,6 +137,8 @@ RUN --mount=type=ssh source /.venv/bin/activate \
133
137
&& poetry install --no-interaction --no-ansi \
134
138
&& true
135
139
140
+ RUN mkdir -p /opt/templates \
141
+ && curl -L https://github.com/pvarki/rune-fake-metadata/releases/latest/download/rune.json -o /opt/templates/rune-fake.json
136
142
137
143
# 0############
138
144
# Run tests #
Original file line number Diff line number Diff line change 14
14
@router .post ("/{language}" )
15
15
async def user_intructions (user : UserCRUDRequest ) -> Dict [str , str ]:
16
16
"""return user instructions"""
17
- return {
18
- "callsign" : user .callsign ,
19
- "instructions" : "FIXME: Return something sane" ,
20
- "language" : "en" ,
21
- }
17
+ instructions_json_file = Path ("/opt/templates/rune-fake.json" )
18
+
19
+ tak_instructions_data = json .loads (instructions_json_file .read_text (encoding = "utf-8" ))
20
+
21
+ return {"callsign" : user .callsign , "instructions" : json .dumps (tak_instructions_data ), "language" : language }
22
+
You can’t perform that action at this time.
0 commit comments