mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-05 19:04:02 +00:00
Merge upstream/main into pr/mapillary-layer
Upstream took share token '2' for fire perimeters, so Street Level moves to '3'. mapillary-js joins upstream's optimizeDeps include list instead of overriding it; catalog and registry tests count the new upstream layers. Co-Authored-By: Claude Fable 5.1 <[email protected]>
This commit is contained in:
commit
9ba6f96d87
204 files changed
+24525
-314
No files matched your search
@@ -196,9 +196,9 @@ test('FIRMS retains a large successful source during partial failure and filters
|
||||
const first = json(await request());
|
||||
assert.equal(first.count, 130001);
|
||||
assert.equal(first.sources.filter((s) => s.ok).length, 1);
|
||||
assert.equal(calls, 3);
|
||||
assert.equal(calls, 4);
|
||||
assert.equal(json(await request()).count, 130001);
|
||||
assert.equal(calls, 3);
|
||||
assert.equal(calls, 4);
|
||||
assert.deepEqual(json(await request('/status')).transactions, {
|
||||
used: 3,
|
||||
limit: 5000,
|
||||
|
||||
@@ -353,3 +353,31 @@ test('military cooldown bounds untrusted Retry-After and defaults server errors'
|
||||
assert.equal(Number(result.headers['retry-after']), seconds);
|
||||
}
|
||||
});
|
||||
|
||||
test('track backfill proxy returns 502 on an oversized upstream body and caches it as an error', async (t) => {
|
||||
const tracks = install(providers.trackBackfillProxies(), true);
|
||||
let callCount = 0;
|
||||
t.mock.method(globalThis, 'fetch', async () => {
|
||||
callCount++;
|
||||
return {
|
||||
ok: true,
|
||||
status: 200,
|
||||
headers: new Map(),
|
||||
body: (async function* () {
|
||||
yield Buffer.alloc(6 * 1024 * 1024, 'x');
|
||||
})(),
|
||||
};
|
||||
});
|
||||
|
||||
const res1 = await tracks('/api/opensky-track', '?icao24=def456');
|
||||
assert.equal(res1.statusCode, 502);
|
||||
assert.deepEqual(JSON.parse(res1.body), {
|
||||
error: 'Upstream track response too large',
|
||||
});
|
||||
|
||||
// Cached as a 502 (never a 200): a retry inside the window neither
|
||||
// reads as an empty track nor spends OpenSky credits on another download.
|
||||
const res2 = await tracks('/api/opensky-track', '?icao24=def456');
|
||||
assert.equal(res2.statusCode, 502);
|
||||
assert.equal(callCount, 1);
|
||||
});
|
||||
@@ -8,7 +8,9 @@ import { apiNotFoundPlugin } from '../../server/standalone/api-not-found.js';
|
||||
import { makeFixtureRoot } from './fixtureRoot.mjs';
|
||||
|
||||
test('data providers have both hooks; credential editing stays development-only', () => {
|
||||
for (const plugin of localProviderPlugins()) {
|
||||
const plugins = localProviderPlugins();
|
||||
assert.ok(plugins.some(({ name }) => name === 'fire-perimeters'));
|
||||
for (const plugin of plugins) {
|
||||
if (plugin.name === 'gev-key-setup') {
|
||||
assert.equal(plugin.configurePreviewServer, undefined);
|
||||
assert.equal(
|
||||
@@ -99,6 +101,7 @@ test('real dev and built-preview servers serve provider JSON and terminate unkno
|
||||
['/api/adsblol/mil', 200],
|
||||
['/api/adsbdb/type/invalid', 400],
|
||||
['/api/firms/status', 200],
|
||||
['/api/fire-perimeters/inciweb/publication/invalid', 400],
|
||||
['/api/terrain/heights?points=invalid', 400],
|
||||
['/api/overpass', 405],
|
||||
['/api/cctv/sources', 200],
|
||||
|
||||
Reference in new issue
Block a user