Skip to content

Commit

Permalink
fixing Specs
Browse files Browse the repository at this point in the history
  • Loading branch information
jesutorrr committed Oct 7, 2024
1 parent 980102c commit 680d28c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion spec/tasks/connectors/snyk_v2/snyk_v2_task_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

it "creates normalized (non-duplicative) vuln_defs" do

Check failure on line 26 in spec/tasks/connectors/snyk_v2/snyk_v2_task_spec.rb

View workflow job for this annotation

GitHub Actions / Native-Ruby-Test

Kenna::Toolkit::SnykV2Task#run vulnerability creates normalized (non-duplicative) vuln_defs Failure/Error: RestClient::Request.execute( method: :get, url:, headers:, verify_ssl: ) VCR::Errors::UnhandledHTTPRequestError: ================================================================================ An HTTP request has been made that VCR does not know how to handle: GET https://api.eu.snyk.io/rest/orgs/abcd1234-5678-90ef-ghij-klmnopqrstuv/issues?created_after=2024-09-07T00:00:00Z&created_before=2024-10-07T00:00:00Z&limit=10&version=2024-04-29 VCR is currently using the following cassette: - /home/runner/work/toolkit/toolkit/spec/fixtures/vcr_cassettes/snyk_v2_task_run.yml - :record => :once - :match_requests_on => [:method, :uri] Under the current configuration VCR can not find a suitable HTTP interaction to replay and is prevented from recording new requests. There are a few ways you can deal with this: * If you're surprised VCR is raising this error and want insight about how VCR attempted to handle the request, you can use the debug_logger configuration option to log more details [1]. * You can use the :new_episodes record mode to allow VCR to record this new request to the existing cassette [2]. * If you want VCR to ignore this request (and others like it), you can set an `ignore_request` callback [3]. * The current record mode (:once) does not allow new requests to be recorded to a previously recorded cassette. You can delete the cassette file and re-run your tests to allow the cassette to be recorded with this request [4]. * The cassette contains 1 HTTP interaction that has not been played back. If your request is non-deterministic, you may need to change your :match_requests_on cassette option to be more lenient or use a custom request matcher to allow it to match [5]. [1] https://www.relishapp.com/vcr/vcr/v/6-1-0/docs/configuration/debug-logging [2] https://www.relishapp.com/vcr/vcr/v/6-1-0/docs/record-modes/new-episodes [3] https://www.relishapp.com/vcr/vcr/v/6-1-0/docs/configuration/ignore-request [4] https://www.relishapp.com/vcr/vcr/v/6-1-0/docs/record-modes/once [5] https://www.relishapp.com/vcr/vcr/v/6-1-0/docs/request-matching ================================================================================
VCR.use_cassette('snyk_v2_task_run') do
task.run(options) # Ejecución de la tarea dentro del bloque VCR
task.run(options)
end

expect(task.vuln_defs).to include(
Expand Down
4 changes: 2 additions & 2 deletions tasks/connectors/snyk_v2/snyk_v2_task.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ def self.metadata
type: "date",
required: false,
default: 30,
description: "default will be 30 days before today format: YYYY-MM-DD" },
description: "Default will be 30 days before today format: YYYY-MM-DD" },
{ name: "include_license",
type: "boolean",
required: false,
default: false,
description: "retrieve license issues." },
description: "Retrieve license issues." },
{ name: "page_size",
type: "integer",
required: false,
Expand Down

0 comments on commit 680d28c

Please sign in to comment.