diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-18 19:00:14 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-18 19:00:14 +0000 |
commit | 05f0ebba3a2c8ddf39e436f412dc2ab5bf1353b2 (patch) | |
tree | 11d0f2a6ec31c7793c184106cedc2ded3d9a2cc5 /spec/migrations/delete_security_findings_without_uuid_spec.rb | |
parent | ec73467c23693d0db63a797d10194da9e72a74af (diff) | |
download | gitlab-ce-05f0ebba3a2c8ddf39e436f412dc2ab5bf1353b2.tar.gz |
Add latest changes from gitlab-org/gitlab@15-8-stable-eev15.8.0-rc42
Diffstat (limited to 'spec/migrations/delete_security_findings_without_uuid_spec.rb')
-rw-r--r-- | spec/migrations/delete_security_findings_without_uuid_spec.rb | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/spec/migrations/delete_security_findings_without_uuid_spec.rb b/spec/migrations/delete_security_findings_without_uuid_spec.rb deleted file mode 100644 index e4c17288384..00000000000 --- a/spec/migrations/delete_security_findings_without_uuid_spec.rb +++ /dev/null @@ -1,36 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' -require_migration! - -RSpec.describe DeleteSecurityFindingsWithoutUuid, :suppress_gitlab_schemas_validate_connection, -feature_category: :vulnerability_management do - let(:users) { table(:users) } - let(:namespaces) { table(:namespaces) } - let(:projects) { table(:projects) } - let(:ci_pipelines) { table(:ci_pipelines) } - let(:ci_builds) { table(:ci_builds) } - let(:ci_artifacts) { table(:ci_job_artifacts) } - let(:scanners) { table(:vulnerability_scanners) } - let(:security_scans) { table(:security_scans) } - let(:security_findings) { table(:security_findings) } - let(:sast_file_type) { 5 } - let(:sast_scan_type) { 1 } - - let(:user) { users.create!(email: 'test@gitlab.com', projects_limit: 5) } - let(:namespace) { namespaces.create!(name: 'gitlab', path: 'gitlab-org') } - let(:project) { projects.create!(namespace_id: namespace.id, name: 'foo') } - let(:ci_pipeline) { ci_pipelines.create!(project_id: project.id, ref: 'master', sha: 'adf43c3a', status: 'success') } - let(:ci_build) { ci_builds.create!(commit_id: ci_pipeline.id, retried: false, type: 'Ci::Build') } - let(:ci_artifact) { ci_artifacts.create!(project_id: project.id, job_id: ci_build.id, file_type: sast_file_type, file_format: 1) } - let(:scanner) { scanners.create!(project_id: project.id, external_id: 'bandit', name: 'Bandit') } - let(:security_scan) { security_scans.create!(build_id: ci_build.id, scan_type: sast_scan_type) } - - let!(:finding_1) { security_findings.create!(scan_id: security_scan.id, scanner_id: scanner.id, severity: 0, confidence: 0, project_fingerprint: Digest::SHA1.hexdigest(SecureRandom.uuid)) } - let!(:finding_2) { security_findings.create!(scan_id: security_scan.id, scanner_id: scanner.id, severity: 0, confidence: 0, project_fingerprint: Digest::SHA1.hexdigest(SecureRandom.uuid), uuid: SecureRandom.uuid) } - - it 'successfully runs and does not schedule any job' do - expect { migrate! }.to change { described_class::SecurityFinding.count }.by(-1) - .and change { described_class::SecurityFinding.where(id: finding_1) } - end -end |