knapsack_pro 3.3.0 → 3.3.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 11036d33c04d07966ab4acadc55b1fb20a885b0e9b0d78fc8cf03fe798b7c3bf
|
4
|
+
data.tar.gz: 8ddfce179b4f7fce9bd28ae965bf15bec132b26b217326d5ce156e94e21cb145
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4c27910d9850ad2d229864dac8b07cb17d9d23a9bd2d14aa05052b6e95a3e218667b32fb40f711324651d2bcd6ee8d180fc7d743ba5cd3b990908ab05d5c57de
|
7
|
+
data.tar.gz: a868ac3c2ef9c1fdefc655b2dbb59c8034cc21101717be46400fdeec087bd99c62c43c5357fbba1eccfe8a8cc23b032ee1e9e8eb14e75304357ccbe6a179a32b
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,13 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
+
### 3.3.1
|
4
|
+
|
5
|
+
* Skip loading a test file path for Minitest in Queue Mode when it does not exist on the disk
|
6
|
+
|
7
|
+
https://github.com/KnapsackPro/knapsack_pro-ruby/pull/174
|
8
|
+
|
9
|
+
https://github.com/KnapsackPro/knapsack_pro-ruby/compare/v3.3.0...v3.3.1
|
10
|
+
|
3
11
|
### 3.3.0
|
4
12
|
|
5
13
|
* Show a JSON report file content when RSpec fails during a dry run
|
@@ -91,7 +91,13 @@ module KnapsackPro
|
|
91
91
|
|
92
92
|
def self.minitest_run(runner, test_file_paths, args)
|
93
93
|
test_file_paths.each do |test_file_path|
|
94
|
-
|
94
|
+
relative_test_file_path = "./#{test_file_path}"
|
95
|
+
|
96
|
+
if File.exist?(relative_test_file_path)
|
97
|
+
require relative_test_file_path
|
98
|
+
else
|
99
|
+
KnapsackPro.logger.warn("Skip loading the #{relative_test_file_path} test file path because it does not exist on the disk. Most likely, the test file path should not be loaded. The test file path could have been recorded during the previous CI build when the knapsack_pro gem could not attribute the execution time of a test to a correct test file path. For instance, you have shared examples in your test suite, and the knapsack_pro gem could not correctly determine for which test file path they were executed. In such a case, the test file path should not be loaded because the actual test cases will be executed by loading a correct test file path. You can ignore this warning.")
|
100
|
+
end
|
95
101
|
end
|
96
102
|
|
97
103
|
# duplicate args because Minitest modifies args
|
data/lib/knapsack_pro/version.rb
CHANGED
@@ -100,7 +100,7 @@ describe KnapsackPro::Runners::Queue::MinitestRunner do
|
|
100
100
|
end
|
101
101
|
|
102
102
|
context 'when test files exist' do
|
103
|
-
let(:test_file_paths) { ['a_test.rb', 'b_test.rb'] }
|
103
|
+
let(:test_file_paths) { ['a_test.rb', 'b_test.rb', 'fake_path_test.rb'] }
|
104
104
|
|
105
105
|
before do
|
106
106
|
subset_queue_id = 'fake-subset-queue-id'
|
@@ -114,8 +114,12 @@ describe KnapsackPro::Runners::Queue::MinitestRunner do
|
|
114
114
|
expect(tracker).to receive(:set_prerun_tests).with(test_file_paths)
|
115
115
|
|
116
116
|
# .minitest_run
|
117
|
+
expect(File).to receive(:exist?).with('./a_test.rb').and_return(true)
|
118
|
+
expect(File).to receive(:exist?).with('./b_test.rb').and_return(true)
|
119
|
+
expect(File).to receive(:exist?).with('./fake_path_test.rb').and_return(false)
|
117
120
|
expect(described_class).to receive(:require).with('./a_test.rb')
|
118
121
|
expect(described_class).to receive(:require).with('./b_test.rb')
|
122
|
+
expect(described_class).to_not receive(:require).with('./fake_path_test.rb')
|
119
123
|
|
120
124
|
expect(Minitest).to receive(:run).with(args).and_return(is_tests_green)
|
121
125
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: knapsack_pro
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.3.
|
4
|
+
version: 3.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ArturT
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-07-
|
11
|
+
date: 2022-07-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|