Skip to content

Commit

Permalink
Misc test fixes (#1189)
Browse files Browse the repository at this point in the history
* try test fixes

* only run unit tests

* add logs to locker test

* try smth

* run all tests

* test

* test

* disable wait on played back recordings

* fix test translator

* fix revenue contract

* reset ci

* remove accidnetal changes from test_evergreen_order

* remove accidental puts

* move env in translator to before

* fix gem audit error

* fix bundle audit

* fix tc
  • Loading branch information
rish-stripe authored Aug 23, 2023
1 parent 9ba49ce commit 6386e11
Show file tree
Hide file tree
Showing 13 changed files with 4,166 additions and 925 deletions.
6 changes: 3 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,18 @@ gem 'sorbet-rails', '~> 0.7.34'
# Force version dependents (to appease security audits)
gem 'sinatra', '~> 2.2.3' # resque dependent
gem 'rack', '>= 2.2.6.4'
gem 'activesupport', '~> 6.1.7'
gem 'activesupport', '~> 6.1.7.6'

# https://github.com/ruby/irb/issues/43
gem 'reline', '~> 0.3.1'

gem 'dotenv-rails', '2.8.1', groups: [:development, :test]
gem 'foreman', groups: [:development, :test]
gem 'rails', '~> 6.1.7.4'
gem 'rails', '~> 6.1.7.6'
gem 'lograge', '~> 0.12'

group :production do
gem 'puma', '~> 5.6.5'
gem 'puma', '~> 5.6.7'
end

# sentry
Expand Down
171 changes: 86 additions & 85 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9,72 +9,72 @@ GIT
GEM
remote: https://rubygems.org/
specs:
actioncable (6.1.7.4)
actionpack (= 6.1.7.4)
activesupport (= 6.1.7.4)
actioncable (6.1.7.6)
actionpack (= 6.1.7.6)
activesupport (= 6.1.7.6)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailbox (6.1.7.4)
actionpack (= 6.1.7.4)
activejob (= 6.1.7.4)
activerecord (= 6.1.7.4)
activestorage (= 6.1.7.4)
activesupport (= 6.1.7.4)
actionmailbox (6.1.7.6)
actionpack (= 6.1.7.6)
activejob (= 6.1.7.6)
activerecord (= 6.1.7.6)
activestorage (= 6.1.7.6)
activesupport (= 6.1.7.6)
mail (>= 2.7.1)
actionmailer (6.1.7.4)
actionpack (= 6.1.7.4)
actionview (= 6.1.7.4)
activejob (= 6.1.7.4)
activesupport (= 6.1.7.4)
actionmailer (6.1.7.6)
actionpack (= 6.1.7.6)
actionview (= 6.1.7.6)
activejob (= 6.1.7.6)
activesupport (= 6.1.7.6)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
actionpack (6.1.7.4)
actionview (= 6.1.7.4)
activesupport (= 6.1.7.4)
actionpack (6.1.7.6)
actionview (= 6.1.7.6)
activesupport (= 6.1.7.6)
rack (~> 2.0, >= 2.0.9)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.2.0)
actiontext (6.1.7.4)
actionpack (= 6.1.7.4)
activerecord (= 6.1.7.4)
activestorage (= 6.1.7.4)
activesupport (= 6.1.7.4)
actiontext (6.1.7.6)
actionpack (= 6.1.7.6)
activerecord (= 6.1.7.6)
activestorage (= 6.1.7.6)
activesupport (= 6.1.7.6)
nokogiri (>= 1.8.5)
actionview (6.1.7.4)
activesupport (= 6.1.7.4)
actionview (6.1.7.6)
activesupport (= 6.1.7.6)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.1, >= 1.2.0)
activejob (6.1.7.4)
activesupport (= 6.1.7.4)
activejob (6.1.7.6)
activesupport (= 6.1.7.6)
globalid (>= 0.3.6)
activemodel (6.1.7.4)
activesupport (= 6.1.7.4)
activerecord (6.1.7.4)
activemodel (= 6.1.7.4)
activesupport (= 6.1.7.4)
activestorage (6.1.7.4)
actionpack (= 6.1.7.4)
activejob (= 6.1.7.4)
activerecord (= 6.1.7.4)
activesupport (= 6.1.7.4)
activemodel (6.1.7.6)
activesupport (= 6.1.7.6)
activerecord (6.1.7.6)
activemodel (= 6.1.7.6)
activesupport (= 6.1.7.6)
activestorage (6.1.7.6)
actionpack (= 6.1.7.6)
activejob (= 6.1.7.6)
activerecord (= 6.1.7.6)
activesupport (= 6.1.7.6)
marcel (~> 1.0)
mini_mime (>= 1.1.0)
activesupport (6.1.7.4)
activesupport (6.1.7.6)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0)
zeitwerk (~> 2.3)
addressable (2.8.4)
addressable (2.8.5)
public_suffix (>= 2.0.2, < 6.0)
ansi (1.5.0)
ast (2.4.2)
aws-eventstream (1.2.0)
aws-partitions (1.782.0)
aws-sdk-core (3.176.0)
aws-partitions (1.809.0)
aws-sdk-core (3.181.0)
aws-eventstream (~> 1, >= 1.0.2)
aws-partitions (~> 1, >= 1.651.0)
aws-sigv4 (~> 1.5)
Expand Down Expand Up @@ -163,7 +163,7 @@ GEM
listen (3.8.0)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
lograge (0.12.0)
lograge (0.13.0)
actionpack (>= 4)
activesupport (>= 4)
railties (>= 4)
Expand All @@ -179,10 +179,10 @@ GEM
marcel (1.0.2)
matrix (0.4.2)
method_source (1.0.0)
mime-types (3.4.1)
mime-types (3.5.1)
mime-types-data (~> 3.2015)
mime-types-data (3.2023.0218.1)
mini_mime (1.1.2)
mime-types-data (3.2023.0808)
mini_mime (1.1.5)
mini_portile2 (2.8.4)
minitest (5.16.3)
minitest-ci (3.4.0)
Expand All @@ -198,13 +198,13 @@ GEM
ruby-progressbar
mocha (1.16.1)
mono_logger (1.1.2)
msgpack (1.7.1)
msgpack (1.7.2)
multi_json (1.15.0)
multi_xml (0.6.0)
multipart-post (2.3.0)
mustermann (2.0.2)
ruby2_keywords (~> 0.0.1)
net-imap (0.3.6)
net-imap (0.3.7)
date
net-protocol
net-pop (0.1.2)
Expand All @@ -215,14 +215,14 @@ GEM
net-protocol
netrc (0.11.0)
nio4r (2.5.9)
nokogiri (1.15.2)
nokogiri (1.15.4)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
nokogiri (1.15.2-arm64-darwin)
nokogiri (1.15.4-arm64-darwin)
racc (~> 1.4)
nokogiri (1.15.2-x86_64-darwin)
nokogiri (1.15.4-x86_64-darwin)
racc (~> 1.4)
nokogiri (1.15.2-x86_64-linux)
nokogiri (1.15.4-x86_64-linux)
racc (~> 1.4)
oauth2 (1.4.11)
faraday (>= 0.17.3, < 3.0)
Expand Down Expand Up @@ -269,41 +269,42 @@ GEM
pry-stack_explorer (0.6.1)
binding_of_caller (~> 1.0)
pry (~> 0.13)
public_suffix (5.0.1)
puma (5.6.6)
public_suffix (5.0.3)
puma (5.6.7)
nio4r (~> 2.0)
raabro (1.4.0)
racc (1.7.1)
rack (2.2.7)
rack (2.2.8)
rack-attack (6.6.1)
rack (>= 1.0, < 3)
rack-protection (2.2.4)
rack
rack-test (2.0.2)
rack (>= 1.3)
rails (6.1.7.4)
actioncable (= 6.1.7.4)
actionmailbox (= 6.1.7.4)
actionmailer (= 6.1.7.4)
actionpack (= 6.1.7.4)
actiontext (= 6.1.7.4)
actionview (= 6.1.7.4)
activejob (= 6.1.7.4)
activemodel (= 6.1.7.4)
activerecord (= 6.1.7.4)
activestorage (= 6.1.7.4)
activesupport (= 6.1.7.4)
rails (6.1.7.6)
actioncable (= 6.1.7.6)
actionmailbox (= 6.1.7.6)
actionmailer (= 6.1.7.6)
actionpack (= 6.1.7.6)
actiontext (= 6.1.7.6)
actionview (= 6.1.7.6)
activejob (= 6.1.7.6)
activemodel (= 6.1.7.6)
activerecord (= 6.1.7.6)
activestorage (= 6.1.7.6)
activesupport (= 6.1.7.6)
bundler (>= 1.15.0)
railties (= 6.1.7.4)
railties (= 6.1.7.6)
sprockets-rails (>= 2.0.0)
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
rails-dom-testing (2.2.0)
activesupport (>= 5.0.0)
minitest
nokogiri (>= 1.6)
rails-html-sanitizer (1.4.4)
loofah (~> 2.19, >= 2.19.1)
railties (6.1.7.4)
actionpack (= 6.1.7.4)
activesupport (= 6.1.7.4)
railties (6.1.7.6)
actionpack (= 6.1.7.6)
activesupport (= 6.1.7.6)
method_source
rake (>= 12.2)
thor (~> 1.0)
Expand All @@ -316,7 +317,7 @@ GEM
redis-namespace (1.11.0)
redis (>= 4)
regexp_parser (2.8.1)
reline (0.3.5)
reline (0.3.8)
io-console (~> 0.5)
request_store (1.5.1)
rack (>= 1.4)
Expand Down Expand Up @@ -347,7 +348,7 @@ GEM
faraday-net_http (< 3.0.0)
hashie (>= 1.2.0, < 6.0)
jwt (>= 1.5.6)
rexml (3.2.5)
rexml (3.2.6)
rubocop (0.89.1)
parallel (~> 1.10)
parser (>= 2.7.1.1)
Expand Down Expand Up @@ -396,8 +397,8 @@ GEM
rack-protection (= 2.2.4)
tilt (~> 2.0)
slop (3.6.0)
sorbet (0.5.10891)
sorbet-static (= 0.5.10891)
sorbet (0.5.10983)
sorbet-static (= 0.5.10983)
sorbet-coerce (0.7.0)
polyfill (~> 1.8)
safe_type (~> 1.1, >= 1.1.1)
Expand All @@ -408,10 +409,10 @@ GEM
parser (>= 2.7)
sorbet-coerce (>= 0.2.6)
sorbet-runtime (>= 0.5.9892)
sorbet-runtime (0.5.10891)
sorbet-static (0.5.10891-universal-darwin-21)
sorbet-static (0.5.10891-universal-darwin-22)
sorbet-static (0.5.10891-x86_64-linux)
sorbet-runtime (0.5.10983)
sorbet-static (0.5.10983-universal-darwin-21)
sorbet-static (0.5.10983-universal-darwin-22)
sorbet-static (0.5.10983-x86_64-linux)
spring (4.1.1)
sprockets (4.2.0)
concurrent-ruby (~> 1.0)
Expand All @@ -423,7 +424,7 @@ GEM
stripe (7.1.0)
thor (1.2.2)
tilt (2.2.0)
timecop (0.9.6)
timecop (0.9.8)
timeout (0.4.0)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
Expand All @@ -441,12 +442,12 @@ GEM
crack (>= 0.3.2)
hashdiff (>= 0.4.0, < 2.0.0)
websocket (1.2.9)
websocket-driver (0.7.5)
websocket-driver (0.7.6)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
xpath (3.2.0)
nokogiri (~> 1.8)
zeitwerk (2.6.8)
zeitwerk (2.6.11)

PLATFORMS
arm64-darwin-21
Expand All @@ -456,7 +457,7 @@ PLATFORMS
x86_64-linux

DEPENDENCIES
activesupport (~> 6.1.7)
activesupport (~> 6.1.7.6)
aws-sdk-kms (~> 1.42.0)
better_errors (~> 2.9.1)
binding_of_caller (~> 1.0.0)
Expand Down Expand Up @@ -490,11 +491,11 @@ DEPENDENCIES
pry-remote (~> 0.1.8)
pry-rescue (~> 1.5.2)
pry-stack_explorer (~> 0.6.1)
puma (~> 5.6.5)
puma (~> 5.6.7)
rack (>= 2.2.6.4)
rack-attack (~> 6.6.1)
rack-test (~> 2.0.2)
rails (~> 6.1.7.4)
rails (~> 6.1.7.6)
rails-html-sanitizer (= 1.4.4)
redis (~> 4.5.1)
reline (~> 0.3.1)
Expand Down
8 changes: 4 additions & 4 deletions sorbet/rbi/hidden-definitions/hidden.rbi
Original file line number Diff line number Diff line change
Expand Up @@ -34357,15 +34357,15 @@ module ObjectSpace

def self.allocation_sourceline(arg); end

def self.count_imemo_objects(*arg); end
def self.count_imemo_objects(arg); end

def self.count_nodes(*arg); end

def self.count_objects_size(*arg); end
def self.count_objects_size(arg); end

def self.count_symbols(*arg); end

def self.count_tdata_objects(*arg); end
def self.count_tdata_objects(arg); end

def self.dump(*arg); end

Expand All @@ -34377,7 +34377,7 @@ module ObjectSpace

def self.memsize_of(arg); end

def self.memsize_of_all(*arg); end
def self.memsize_of_all(arg); end

def self.reachable_objects_from(arg); end

Expand Down
8 changes: 5 additions & 3 deletions test/support/common_helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -202,9 +202,11 @@ def advance_test_clock(stripe_customer, advance_timestamp)
test_clock.advance(frozen_time: advance_timestamp)

# test clocks can take some time...
wait_until(timeout: 5.minutes) do
test_clock.refresh
test_clock.status == 'ready'
if VCR.current_cassette.originally_recorded_at.nil?
wait_until(timeout: 5.minutes) do
test_clock.refresh
test_clock.status == 'ready'
end
end

test_clock
Expand Down
Loading

0 comments on commit 6386e11

Please sign in to comment.