fixed sonarqube scan issues
Sonarqube Scanner / Build and analyze (push) Failing after 22s

This commit is contained in:
Florian Zumpe
2026-06-17 15:12:46 +02:00
parent 2442f8d458
commit 95026aac6e
28 changed files with 973 additions and 184 deletions
+10 -1
View File
@@ -44,14 +44,23 @@ test('Python API tools are syntax-valid and contain reusable 401 authentication
await fs.rm(path.join(toolsDir, '__pycache__'), { recursive: true, force: true });
const common = await read('tools/python/common.py');
const sonar = await read('sonar-project.properties');
const requirements = await read('requirements-dev.txt');
const pkg = JSON.parse(await read('package.json'));
assert.match(common, /class ApiClient/);
assert.match(common, /error\.code == 401/);
assert.match(common, /error\.code != 401/);
assert.match(common, /MAX_AUTH_ATTEMPTS/);
assert.match(common, /self\.prompt_credentials\(\)/);
assert.match(common, /getpass\.getpass/);
assert.match(common, /os\.getenv\(API_USER_ENV/);
assert.match(common, /os\.getenv\(API_PASSWORD_ENV/);
assert.match(common, /def encode_multipart/);
assert.match(common, /traceback\.print_exception/);
assert.doesNotMatch(common, /Content-Type:.*application\/octet-stream/);
assert.match(pkg.scripts['test:coverage'], /test:coverage:python/);
assert.match(pkg.scripts['test:coverage:python'], /coverage\/python\/coverage\.xml/);
assert.match(sonar, /sonar\.python\.coverage\.reportPaths=coverage\/python\/coverage\.xml/);
assert.match(requirements, /^coverage==/m);
});