Skip to content

Commit

Permalink
feat: stage unmanaged depgraph-endpoints (#4811)
Browse files Browse the repository at this point in the history
* feat: use 2023-08-31~ga for unmanaged

* feat: use 2023-09-01~experimental for unmanaged

* feat: bump snyk-cpp-plugin to v2.24.0
  • Loading branch information
Daniel Ekelund authored Sep 4, 2023
1 parent 753f5b8 commit d950c5f
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 11 deletions.
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
"rimraf": "^2.6.3",
"semver": "^6.0.0",
"snyk-config": "4.0.0",
"snyk-cpp-plugin": "2.22.2",
"snyk-cpp-plugin": "2.24.0",
"snyk-docker-plugin": "6.5.9",
"snyk-go-plugin": "1.23.0",
"snyk-gradle-plugin": "3.27.0",
Expand Down
6 changes: 3 additions & 3 deletions src/lib/polling/polling-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export async function getIssues(
): Promise<GetIssuesResponse> {
const payload = {
method: 'POST',
url: `${config.API_HIDDEN_URL}/orgs/${orgId}/unmanaged_ecosystem/issues?version=2022-06-29~experimental`,
url: `${config.API_HIDDEN_URL}/orgs/${orgId}/unmanaged_ecosystem/issues?version=2023-09-01~experimental`,
body: issuesRequestAttributes,
};

Expand All @@ -37,7 +37,7 @@ export async function getDepGraph(
): Promise<GetDepGraphResponse> {
const payload = {
method: 'GET',
url: `${config.API_HIDDEN_URL}/orgs/${orgId}/unmanaged_ecosystem/depgraphs/${id}?version=2022-05-23~experimental`,
url: `${config.API_HIDDEN_URL}/orgs/${orgId}/unmanaged_ecosystem/depgraphs/${id}?version=2023-09-01~experimental`,
};

return await makeRequestRest<GetDepGraphResponse>(payload);
Expand All @@ -49,7 +49,7 @@ export async function createDepGraph(
): Promise<CreateDepGraphResponse> {
const payload = {
method: 'POST',
url: `${config.API_HIDDEN_URL}/orgs/${orgId}/unmanaged_ecosystem/depgraphs?version=2022-05-23~experimental`,
url: `${config.API_HIDDEN_URL}/orgs/${orgId}/unmanaged_ecosystem/depgraphs?version=2023-09-01~experimental`,
body: hashes,
};

Expand Down
20 changes: 20 additions & 0 deletions test/jest/acceptance/snyk-test/basic-test-all-languages.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,26 @@ describe('`snyk test` of basic projects for each language/ecosystem', () => {
expect(code).toEqual(1);
});

test('run `snyk test` on an unmanaged project with purls', async () => {
const project = await createProjectFromWorkspace('unmanaged');

const { stdout } = await runSnykCLI(`test --unmanaged -d`, {
cwd: project.path(),
});

stdout.includes('purl: pkg:generic/zlib@');
});

test('run `snyk test --json` on an unmanaged project with purls', async () => {
const project = await createProjectFromWorkspace('unmanaged');

const { stdout } = await runSnykCLI(`test --unmanaged -d --json`, {
cwd: project.path(),
});

stdout.includes('"purl": "pkg:generic/zlib@');
});

test('run `snyk test` on a hex project', async () => {
const prerequisite = await runCommand('mix', ['--version']).catch(
function() {
Expand Down

0 comments on commit d950c5f

Please sign in to comment.