-
Notifications
You must be signed in to change notification settings - Fork 2
/
deploy.test.js.snap
255 lines (226 loc) · 6.02 KB
/
deploy.test.js.snap
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`displays general validation errors 1`] = `
Array [
Array [
"[31m[1m✕[22m[39m [31m[1mDeployment failed [90m(xxxx-xxxx-xxxx)[31m[22m[39m",
],
Array [
"",
],
Array [
" 1) [36mname[39m is required",
],
Array [
"",
],
]
`;
exports[`displays instructions for a missing mailchimp api key 1`] = `
Array [
Array [
"[31m[1m✕[22m[39m [31m[1mDeployment failed [90m(xxxx-xxxx-xxxx)[31m[22m[39m",
],
Array [
"",
],
Array [
" 1) The secret [36m[1m@my-mailchimp-key[22m[39m is not defined yet [90m(actions[0].apiKey)[39m",
],
Array [
"",
],
Array [
" Here's where to find your API key:
• Log in to your Mailchimp account
• Open the menu with your avatar in the upper right
• Navigate to [1m[36mProfile › Extras › API keys[39m[22m
• Under \\"Your API keys\\", click [1m[36mCreate A Key[39m[22m
Copy the generated key and run the following command:
[90m$[39m statickit secrets add [36mmy-mailchimp-key[39m [33m<paste-api-key-here>[39m",
],
Array [
"",
],
Array [
"",
],
Array [
"",
],
]
`;
exports[`displays instructions for a missing mailchimp audience 1`] = `
Array [
Array [
"[31m[1m✕[22m[39m [31m[1mDeployment failed [90m(xxxx-xxxx-xxxx)[31m[22m[39m",
],
Array [
"",
],
Array [
" 1) The secret [36m[1m@my-mailchimp-audience[22m[39m is not defined yet [90m(actions[0].audience)[39m",
],
Array [
"",
],
Array [
" Here's how to found your Audience ID:
• Log in to your Mailchimp account
• Click the [1m[36mAudience[39m[22m tab at the top
• Navigate to [1m[36mManage Audience › Settings[39m[22m
• Click [1m[36mAudience name and defaults[39m[22m
• Locate the value under the \\"Audience ID\\" heading
Copy the ID and run the following command:
[90m$[39m statickit secrets add [36mmy-mailchimp-audience[39m [33m<paste-audience-id-here>[39m",
],
Array [
"",
],
Array [
"",
],
Array [
"",
],
]
`;
exports[`displays instructions when a secret reference is required 1`] = `
Array [
Array [
"[31m[1m✕[22m[39m [31m[1mDeployment failed [90m(xxxx-xxxx-xxxx)[31m[22m[39m",
],
Array [
"",
],
Array [
" 1) [36m[1mactions[0].apiKey[22m[39m must reference a secret (e.g. [36m[1m@mailchimp-api-key[22m[39m)",
],
Array [
"",
],
Array [
" This field must reference a secret instead of a raw value,
because it's too sensitive to commit to version control.
[33m[1m-- Instructions ----------------------------------------------------------[22m[39m
First, choose a name for this value and run the following command:
[90m$[39m statickit secrets add [36mmailchimp-api-key[39m [32m\\"myinlinekey\\"[39m
Then, reference your secret like this (notice the @-symbol prefix):
{
[32m\\"apiKey\\"[39m: [32m\\"@mailchimp-api-key\\"[39m
}",
],
Array [
"",
],
Array [
"",
],
Array [
"",
],
]
`;
exports[`does not install the shim if --no-shim is used 1`] = `
Array [
Array [
"[32m✔[39m [32mDeployment succeeded [90m(xxxx-xxxx-xxxx)[32m[39m",
],
]
`;
exports[`does not install the shim if not present in the response 1`] = `
Array [
Array [
"[32m✔[39m [32mDeployment succeeded [90m(xxxx-xxxx-xxxx)[32m[39m",
],
]
`;
exports[`installs the shim if present in the response 1`] = `
Array [
Array [
"[32m✔[39m [32mDeployment succeeded [90m(xxxx-xxxx-xxxx)[32m[39m",
],
Array [
"[32m✔[39m [32mFunctions installed [90m(shim-ref)[32m[39m",
],
]
`;
exports[`outputs shim install errors 1`] = `
Array [
Array [
"[31m[1m✕[22m[39m [31m[1mFunctions failed to install[22m[39m",
],
Array [
[Error: error installing package],
],
]
`;
exports[`sends a deploy request with the right params 1`] = `
Array [
Array [
"[32m✔[39m [32mDeployment succeeded [90m(xxxx-xxxx-xxxx)[32m[39m",
],
]
`;
exports[`skips validating inline secrets with force flag 1`] = `
Array [
Array [
"[32m✔[39m [32mDeployment succeeded [90m(xxxx-xxxx-xxxx)[32m[39m",
],
]
`;
exports[`substitutes all referenced environment variables 1`] = `
Array [
Array [
"[32m✔[39m [32mDeployment succeeded [90m(xxxx-xxxx-xxxx)[32m[39m",
],
]
`;
exports[`throws an error if apiKey properties do not point to env vars 1`] = `
Array [
Array [
"[31m[1m✕[22m[39m [31m[1mThe following properties must reference environment variables: apiKey[22m[39m",
],
]
`;
exports[`throws an error if apiKey properties do not point to env vars 2`] = `
Array [
Array [
"[90m>[39m [90mTo override this, use the \`-f\` flag.[39m",
],
]
`;
exports[`throws an error if apiSecret properties do not point to env vars 1`] = `
Array [
Array [
"[31m[1m✕[22m[39m [31m[1mThe following properties must reference environment variables: apiSecret[22m[39m",
],
]
`;
exports[`throws an error if apiSecret properties do not point to env vars 2`] = `
Array [
Array [
"[90m>[39m [90mTo override this, use the \`-f\` flag.[39m",
],
]
`;
exports[`throws an error if secretKey properties do not point to env vars 1`] = `
Array [
Array [
"[31m[1m✕[22m[39m [31m[1mThe following properties must reference environment variables: secretKey[22m[39m",
],
]
`;
exports[`throws an error if secretKey properties do not point to env vars 2`] = `
Array [
Array [
"[90m>[39m [90mTo override this, use the \`-f\` flag.[39m",
],
]
`;
exports[`throws an error if undefined env vars are referenced 1`] = `
Array [
Array [
"[31m[1m✕[22m[39m [31m[1mThe following environment variables were referenced but are not defined: MY_SECRET_1, API_KEY_1[22m[39m",
],
]
`;