Add support for custom repositories

This commit is contained in:
Florian Mueller
2023-12-21 00:04:50 +01:00
committed by Slawomir Jaranowski
parent 25432ff633
commit 879f94d6bf
7 changed files with 166 additions and 14 deletions

View File

@ -74,6 +74,7 @@ test('run with all feature', () => {
process.env['INPUT_APACHESNAPSHOTS'] = true;
process.env['INPUT_SONATYPESNAPSHOTS'] = true;
process.env['INPUT_ORACLEREPO'] = true;
process.env['INPUT_REPOSITORIES'] = '[{"id":"repoId","name":"repoName","url":"url","snapshots":{"enabled":true}}]'
cp.spawnSync('node', [ `${indexPath}` ], { env: process.env, stdio: 'inherit' });
const settingsStatus = fs.lstatSync(settingsPath);
@ -200,6 +201,19 @@ test('run with all feature', () => {
</snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
<profile>
<id>_custom_repositories_</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<repositories> <repository>
<id>repoId</id>
<name>repoName</name>
<url>url</url>
<snapshots><enabled>true</enabled></snapshots>
</repository></repositories>
<pluginRepositories/>
</profile></profiles>
<servers>
<server>
@ -251,4 +265,4 @@ test('run with all feature', () => {
<nonProxyHosts>nonProxyHost</nonProxyHosts>
</proxy></proxies>
</settings>`);
})
})