@@ -2115,12 +2115,15 @@ test(
2115
2115
sls(['package']);
2116
2116
const cachepath = getUserCachePath();
2117
2117
const cacheFolderHash = sha256Path('.serverless/requirements.txt');
2118
+ const arch = 'x86_64';
2118
2119
t.true(
2119
2120
pathExistsSync(`${cachepath}${sep}downloadCacheslspyc${sep}http`),
2120
2121
'http exists in download-cache'
2121
2122
);
2122
2123
t.true(
2123
- pathExistsSync(`${cachepath}${sep}${cacheFolderHash}_slspyc${sep}flask`),
2124
+ pathExistsSync(
2125
+ `${cachepath}${sep}${cacheFolderHash}_${arch}_slspyc${sep}flask`
2126
+ ),
2124
2127
'flask exists in static-cache'
2125
2128
);
2126
2129
t.end();
@@ -2137,12 +2140,15 @@ test(
2137
2140
sls(['--dockerizePip=true', 'package']);
2138
2141
const cachepath = getUserCachePath();
2139
2142
const cacheFolderHash = sha256Path('.serverless/requirements.txt');
2143
+ const arch = 'x86_64';
2140
2144
t.true(
2141
2145
pathExistsSync(`${cachepath}${sep}downloadCacheslspyc${sep}http`),
2142
2146
'http exists in download-cache'
2143
2147
);
2144
2148
t.true(
2145
- pathExistsSync(`${cachepath}${sep}${cacheFolderHash}_slspyc${sep}flask`),
2149
+ pathExistsSync(
2150
+ `${cachepath}${sep}${cacheFolderHash}_${arch}_slspyc${sep}flask`
2151
+ ),
2146
2152
'flask exists in static-cache'
2147
2153
);
2148
2154
t.end();
@@ -2159,20 +2165,23 @@ test(
2159
2165
sls(['package']);
2160
2166
const cachepath = getUserCachePath();
2161
2167
const cacheFolderHash = sha256Path('.serverless/requirements.txt');
2168
+ const arch = 'x86_64';
2162
2169
t.true(
2163
- pathExistsSync(`${cachepath}${sep}${cacheFolderHash}_slspyc${sep}flask`),
2170
+ pathExistsSync(
2171
+ `${cachepath}${sep}${cacheFolderHash}_${arch}_slspyc${sep}flask`
2172
+ ),
2164
2173
'flask exists in static-cache'
2165
2174
);
2166
2175
t.true(
2167
2176
pathExistsSync(
2168
- `${cachepath}${sep}${cacheFolderHash}_slspyc${sep}.completed_requirements`
2177
+ `${cachepath}${sep}${cacheFolderHash}_${arch} _slspyc${sep}.completed_requirements`
2169
2178
),
2170
2179
'.completed_requirements exists in static-cache'
2171
2180
);
2172
2181
2173
2182
// py3.6 checking that static cache actually pulls from cache (by poisoning it)
2174
2183
writeFileSync(
2175
- `${cachepath}${sep}${cacheFolderHash}_slspyc${sep}injected_file_is_bad_form`,
2184
+ `${cachepath}${sep}${cacheFolderHash}_${arch} _slspyc${sep}injected_file_is_bad_form`,
2176
2185
'injected new file into static cache folder'
2177
2186
);
2178
2187
sls(['package']);
@@ -2197,13 +2206,16 @@ test(
2197
2206
const cachepath = '.requirements-cache';
2198
2207
sls([`--cacheLocation=${cachepath}`, 'package']);
2199
2208
const cacheFolderHash = sha256Path('.serverless/requirements.txt');
2209
+ const arch = 'x86_64';
2200
2210
t.true(
2201
- pathExistsSync(`${cachepath}${sep}${cacheFolderHash}_slspyc${sep}flask`),
2211
+ pathExistsSync(
2212
+ `${cachepath}${sep}${cacheFolderHash}_${arch}_slspyc${sep}flask`
2213
+ ),
2202
2214
'flask exists in static-cache'
2203
2215
);
2204
2216
t.true(
2205
2217
pathExistsSync(
2206
- `${cachepath}${sep}${cacheFolderHash}_slspyc${sep}.completed_requirements`
2218
+ `${cachepath}${sep}${cacheFolderHash}_${arch} _slspyc${sep}.completed_requirements`
2207
2219
),
2208
2220
'.completed_requirements exists in static-cache'
2209
2221
);
@@ -2221,20 +2233,23 @@ test(
2221
2233
sls(['--dockerizePip=true', '--slim=true', 'package']);
2222
2234
const cachepath = getUserCachePath();
2223
2235
const cacheFolderHash = sha256Path('.serverless/requirements.txt');
2236
+ const arch = 'x86_64';
2224
2237
t.true(
2225
- pathExistsSync(`${cachepath}${sep}${cacheFolderHash}_slspyc${sep}flask`),
2238
+ pathExistsSync(
2239
+ `${cachepath}${sep}${cacheFolderHash}_${arch}_slspyc${sep}flask`
2240
+ ),
2226
2241
'flask exists in static-cache'
2227
2242
);
2228
2243
t.true(
2229
2244
pathExistsSync(
2230
- `${cachepath}${sep}${cacheFolderHash}_slspyc${sep}.completed_requirements`
2245
+ `${cachepath}${sep}${cacheFolderHash}_${arch} _slspyc${sep}.completed_requirements`
2231
2246
),
2232
2247
'.completed_requirements exists in static-cache'
2233
2248
);
2234
2249
2235
2250
// py3.6 checking that static cache actually pulls from cache (by poisoning it)
2236
2251
writeFileSync(
2237
- `${cachepath}${sep}${cacheFolderHash}_slspyc${sep}injected_file_is_bad_form`,
2252
+ `${cachepath}${sep}${cacheFolderHash}_${arch} _slspyc${sep}injected_file_is_bad_form`,
2238
2253
'injected new file into static cache folder'
2239
2254
);
2240
2255
sls(['--dockerizePip=true', '--slim=true', 'package']);
0 commit comments