Deduplicate artifact bytes and deliver files by authenticated hash
This commit is contained in:
@@ -72,7 +72,8 @@ describe('GitHub DLL imports', () => {
|
||||
expect(imported.sha256).toBe(sha256);
|
||||
expect(imported.betaUrl).toBe(`/betas?pluginId=${imported.pluginId}&versionId=${imported.versionId}`);
|
||||
expect(getScript(imported.pluginId)).toMatchObject({ kind: 'plugin', target_rel_path: 't6-gsc-utils.dll', scope_value: 't6', current_version_id: null });
|
||||
expect(getVersion(imported.versionId)).toMatchObject({ release_version: 'v3.1.0', content, notes: metadata().body, state: 'untested' });
|
||||
expect(getVersion(imported.versionId)).toMatchObject({ release_version: 'v3.1.0', notes: metadata().body, state: 'untested' });
|
||||
expect((await import('../../src/lib/server/fleet/scripts.js')).getVersionContent(imported.versionId)).toEqual(content);
|
||||
expect(pluginSource(imported.pluginId)).toMatchObject({ repository: 'alicealys/t6-gsc-utils', release_id: 100, asset_id: 200, release_url: url });
|
||||
const duplicates = await Promise.all([1, 2].map(() => importPluginRelease({ url, assetId: 200, pluginId: imported.pluginId })));
|
||||
expect(duplicates.every(r => r.alreadyImported && r.versionId === imported.versionId)).toBe(true);
|
||||
|
||||
Reference in New Issue
Block a user