feat(cli): Improve test runner configuration: update test scripts, reorganize test directories, update dependencies and add local settings for command permissions.

This commit is contained in:
2025-05-15 20:39:03 +00:00
parent d9e0f1f758
commit bac2f852c5
35 changed files with 852 additions and 1279 deletions

View File

@@ -0,0 +1,17 @@
import * as plugins from './plugins.js';
import * as paths from './paths.js';
export const fileUrls = {
dockerAlpineImage: 'https://code.foss.global/testassets/docker/raw/branch/main/alpine.tar',
}
export class TestFileProvider {
public async getDockerAlpineImageAsLocalTarball(): Promise<string> {
const filePath = plugins.path.join(paths.testFilesDir, 'alpine.tar')
// fetch the docker alpine image
const response = await plugins.smartrequest.getBinary(fileUrls.dockerAlpineImage);
await plugins.smartfile.fs.ensureDir(paths.testFilesDir);
await plugins.smartfile.memory.toFs(response.body, filePath);
return filePath;
}
}