Skip to content

Commit

Permalink
use SecureRandom
Browse files Browse the repository at this point in the history
  • Loading branch information
anmarchenko committed Jun 3, 2024
1 parent 69b7fdb commit e05bb7e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
require "minitest/queue/runner"
require "fileutils"
require "securerandom"

RSpec.describe "Minitest instrumentation with Shopify's ci-queue runner" do
include_context "CI mode activated" do
let(:integration_name) { :minitest }
let(:integration_options) { {service_name: "ltest"} }
end

let(:run_id) { rand(1..2**64 - 1) }
let(:run_id) { SecureRandom.random_number(2**64 - 1) }

before do
Minitest::Runnable.reset
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
require "rspec/queue"
require "fileutils"
require "securerandom"

RSpec.describe "RSpec instrumentation with Shopify's ci-queue runner" do
include_context "CI mode activated" do
let(:integration_name) { :rspec }
end

let(:run_id) { rand(1..2**64 - 1) }
let(:run_id) { SecureRandom.random_number(2**64 - 1) }
let(:options) do
RSpec::Core::ConfigurationOptions.new([
"-Ispec/datadog/ci/contrib/ci_queue_rspec/suite_under_test",
Expand Down
3 changes: 2 additions & 1 deletion spec/datadog/ci/contrib/cucumber/instrumentation_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
require "stringio"
require "fileutils"
require "cucumber"
require "securerandom"

RSpec.describe "Cucumber formatter" do
let(:cucumber_features_root) { File.join(__dir__, "features") }
Expand All @@ -22,7 +23,7 @@
let(:cucumber_8_or_above) { Gem::Version.new("8.0.0") <= Datadog::CI::Contrib::Cucumber::Integration.version }
let(:cucumber_4_or_above) { Gem::Version.new("4.0.0") <= Datadog::CI::Contrib::Cucumber::Integration.version }

let(:run_id) { rand(1..2**64 - 1) }
let(:run_id) { SecureRandom.random_number(2**64 - 1) }
let(:steps_file_definition_path) { "spec/datadog/ci/contrib/cucumber/features/step_definitions/steps.rb" }
let(:steps_file_for_run_path) do
"spec/datadog/ci/contrib/cucumber/features/step_definitions/steps_#{run_id}.rb"
Expand Down

0 comments on commit e05bb7e

Please sign in to comment.