Skip to content

Commit

Permalink
test: install pip deps during setup (#5162)
Browse files Browse the repository at this point in the history
  • Loading branch information
thisislawatts authored Apr 15, 2024
1 parent 5fc3d59 commit efb0488
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/jest/acceptance/snyk-sbom/pip-options.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import * as os from 'os';
import { execSync } from 'child_process';

import { createProjectFromWorkspace } from '../../util/createProject';
import { runSnykCLI } from '../../util/runSnykCLI';
Expand Down Expand Up @@ -43,6 +44,7 @@ describe('snyk sbom --command (mocked server only)', () => {
const project = await createProjectFromWorkspace('pip-app');
const command =
os.platform().indexOf('win') === 0 ? 'python3.11.exe' : 'python3';
execSync(`pip install -r requirements.txt`, { cwd: project.path() });

const { code, stdout } = await runSnykCLI(
`sbom --org aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee --format cyclonedx1.4+json --debug --command=${command}`,
Expand All @@ -63,6 +65,7 @@ describe('snyk sbom --command (mocked server only)', () => {

test('`sbom pip-app-custom` generates an SBOM with pip for custom manifest names', async () => {
const project = await createProjectFromWorkspace('pip-app-custom');
execSync(`pip install -r base.txt`, { cwd: project.path() });

const { code, stdout } = await runSnykCLI(
`sbom --org aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee --format cyclonedx1.4+json --debug --package-manager=pip --file=base.txt`,
Expand Down

0 comments on commit efb0488

Please sign in to comment.