Skip to content

Commit afcbfcb

Browse files
committed
fix git tests with shallow clone - do not let list of commits become nil in tests
1 parent 73146a0 commit afcbfcb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

spec/datadog/ci/git/packfiles_spec.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
before { skip if PlatformHelpers.jruby? }
88

99
let(:commits) { Datadog::CI::Git::LocalRepository.git_commits }
10-
let(:included_commits) { commits[0..1] }
11-
let(:excluded_commits) { commits[2..] }
10+
let(:included_commits) { commits[0..1] || [] }
11+
let(:excluded_commits) { commits[2..] || [] }
1212

1313
describe ".generate" do
1414
it "yields packfile" do

0 commit comments

Comments
 (0)