rspec_trunk_flaky_tests 0.13.0-arm64-darwin → 0.13.1.pre.beta.1-arm64-darwin
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/rspec_trunk_flaky_tests/3.0/rspec_trunk_flaky_tests.bundle +0 -0
- data/lib/rspec_trunk_flaky_tests/3.1/rspec_trunk_flaky_tests.bundle +0 -0
- data/lib/rspec_trunk_flaky_tests/3.2/rspec_trunk_flaky_tests.bundle +0 -0
- data/lib/rspec_trunk_flaky_tests/3.3/rspec_trunk_flaky_tests.bundle +0 -0
- data/lib/rspec_trunk_flaky_tests/3.4/rspec_trunk_flaky_tests.bundle +0 -0
- data/lib/rspec_trunk_flaky_tests/4.0/rspec_trunk_flaky_tests.bundle +0 -0
- data/lib/trunk_spec_helper.rb +16 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a2aae3f0c52912fb0666e753d3b8a6c33bb471832d5ae429d82783b8eb9f105e
|
|
4
|
+
data.tar.gz: 48ac9d4ba13c4fc799191091a5fe18e6667fd7256c4ced51a93da14108054c70
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c67ff1e0787063428fd92e15cdddd36a227a782039352801e7cd67e69ced83cc4f2010ef97732280dd0b2a255dc6782a4547469f8459611590ffa811be7936a0
|
|
7
|
+
data.tar.gz: 468c674c3122fc133d9819078fd452fe5538726cb6505306f5fabc5ac10fbbf609237c9113a5b135056aff19a57c88e9daf30595406e4dacca87966dd97131a6
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
data/lib/trunk_spec_helper.rb
CHANGED
|
@@ -27,6 +27,8 @@
|
|
|
27
27
|
# TRUNK_USE_UNCLONED_REPO - Set to 'true' for uncloned repo mode
|
|
28
28
|
# TRUNK_LOCAL_UPLOAD_DIR - Directory to save test results locally (disables upload)
|
|
29
29
|
# TRUNK_QUARANTINED_TESTS_DISK_CACHE_TTL_SECS - Time to cache quarantined tests on disk (in seconds)
|
|
30
|
+
# TRUNK_QUARANTINE_QUERY_FAILURE_EXIT - Set to 'true' to abort the RSpec run when quarantine
|
|
31
|
+
# lookup fails (remaining examples are skipped)
|
|
30
32
|
# DISABLE_RSPEC_TRUNK_FLAKY_TESTS - Set to 'true' to completely disable Trunk
|
|
31
33
|
#
|
|
32
34
|
require 'rspec/core'
|
|
@@ -84,6 +86,10 @@ def trunk_disabled
|
|
|
84
86
|
ENV['TRUNK_ORG_URL_SLUG'].nil? || ENV['TRUNK_API_TOKEN'].nil?
|
|
85
87
|
end
|
|
86
88
|
|
|
89
|
+
def quarantine_query_failure_exit?
|
|
90
|
+
ENV['TRUNK_QUARANTINE_QUERY_FAILURE_EXIT'] == 'true'
|
|
91
|
+
end
|
|
92
|
+
|
|
87
93
|
# we want to cache the test report in memory so we can add to it as we go and reduce the number of API calls
|
|
88
94
|
$test_report = TestReport.new('rspec', "#{$PROGRAM_NAME} #{ARGV.join(' ')}", nil)
|
|
89
95
|
$failure_encountered_and_quarantining_disabled = false
|
|
@@ -126,6 +132,10 @@ module RSpec
|
|
|
126
132
|
puts 'Failed to check quarantining status, no failures will be quarantined'.yellow
|
|
127
133
|
$failure_encountered_and_quarantine_lookup_failed = true
|
|
128
134
|
end
|
|
135
|
+
if quarantine_query_failure_exit?
|
|
136
|
+
puts 'Quarantine lookup failed, exiting early'.red
|
|
137
|
+
RSpec.world.wants_to_quit = true
|
|
138
|
+
end
|
|
129
139
|
set_exception_core(exception)
|
|
130
140
|
elsif is_quarantined_result.quarantining_disabled_for_repo
|
|
131
141
|
unless $failure_encountered_and_quarantining_disabled
|
|
@@ -365,6 +375,12 @@ end
|
|
|
365
375
|
RSpec.configure do |c|
|
|
366
376
|
next if trunk_disabled
|
|
367
377
|
|
|
378
|
+
c.before(:example) do
|
|
379
|
+
if $failure_encountered_and_quarantine_lookup_failed && quarantine_query_failure_exit?
|
|
380
|
+
skip('Quarantine lookup failed, skipping test run')
|
|
381
|
+
end
|
|
382
|
+
end
|
|
383
|
+
|
|
368
384
|
c.reporter.register_listener TrunkAnalyticsListener.new, :example_finished, :close
|
|
369
385
|
end
|
|
370
386
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rspec_trunk_flaky_tests
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.13.
|
|
4
|
+
version: 0.13.1.pre.beta.1
|
|
5
5
|
platform: arm64-darwin
|
|
6
6
|
authors:
|
|
7
7
|
- Trunk Technologies, Inc.
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-06-03 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rspec-core
|