Skip to content

QA: Sort vulnerabilities when comparing to expected report

Can Eldem requested to merge caneldem/12015-change-templates into master

Description

part of our tests include comparing expected tests with generated test by using diff with following command

diff -u filename1 filename2

this command fails when same items are in different location. We used jq command line tool to sort and compare the reports. If that fails it will print diff

Failing pipeline

https://gitlab.com/gitlab-org/security-products/tests/js-npm/pipelines/67675307 (test project)

Passing pipeline

https://gitlab.com/gitlab-org/security-products/tests/js-npm/pipelines/67676610 (test project)

https://gitlab.com/gitlab-org/security-products/analyzers/gemnasium/pipelines/67679981 (gemnasium)

Issue link

https://gitlab.com/gitlab-org/gitlab-ee/issues/12015

Edited by Can Eldem

Merge request reports