This commit is contained in:
@@ -156,6 +156,19 @@ test('uses a release-provided browser download URL without requesting metadata a
|
||||
assert.equal(requested, 'https://gitea.example.test/attachments/direct.exe');
|
||||
});
|
||||
|
||||
test('rewrites Gitea internal HTTP release URLs to the configured public origin', async () => {
|
||||
const service = new GiteaService(makeStore());
|
||||
let requested = '';
|
||||
service.downloadAuthenticated = async (pathname) => {
|
||||
requested = pathname;
|
||||
return Buffer.from('asset');
|
||||
};
|
||||
await service.downloadReleaseAsset('Jens', 'ForgeFlow', 107, 412, {
|
||||
downloadUrl: 'http://192.168.10.150:3000/Jens/ForgeFlow/releases/download/v0.10.1/ForgeFlow.exe',
|
||||
});
|
||||
assert.equal(requested, 'https://gitea.example.test/Jens/ForgeFlow/releases/download/v0.10.1/ForgeFlow.exe');
|
||||
});
|
||||
|
||||
test('creates conservative default branch protection rules', async () => {
|
||||
const service = new GiteaService(makeStore());
|
||||
let request = null;
|
||||
|
||||
Reference in New Issue
Block a user