Closed edanc closed 7 years ago
@sudara @wioux
We'll need to fix the specs before merging this one in
@nathanbertram @sudara i ran the specs in master and got these errors
Failures:
1) PerfCheck::Git#stash_if_needed should call git stash if there are changes
Failure/Error: expect(`git stash list`.lines.size).to eq(1)
expected: 1
got: 8
(compared using ==)
# ./spec/perf_check/git_spec.rb:107:in `block (3 levels) in <top (required)>'
2) PerfCheck::Git#migrations_to_run_down should list those versions on current_branch which are not on master
Failure/Error: expect(git.migrations_to_run_down).to eq(["12345"])
expected: ["12345"]
got: []
(compared using ==)
# ./spec/perf_check/git_spec.rb:139:in `block (3 levels) in <top (required)>'
3) PerfCheck::Middleware#call when backend raises exception should insert X-PerfCheck-StackTrace header with path to backtrace
Failure/Error: expect(middleware.app).to receive(:call).with(env){ raise Exception.new }
Exception:
Exception
# ./spec/perf_check/middleware_spec.rb:32:in `block (5 levels) in <top (required)>'
# ./lib/perf_check/middleware.rb:19:in `call'
# ./spec/perf_check/middleware_spec.rb:33:in `block (4 levels) in <top (required)>'
4) PerfCheck#load_config should rescue exceptions from the config file
Failure/Error: expect{ perf_check.load_config }.to raise_error(PerfCheck::ConfigLoadError)
expected PerfCheck::ConfigLoadError, got #<LoadError: cannot load such file -- tmp/spec/config/perf_check.rb> with backtrace:
# ./lib/perf_check.rb:53:in `load'
# ./lib/perf_check.rb:53:in `load_config'
# ./spec/perf_check_spec.rb:24:in `block (4 levels) in <top (required)>'
# ./spec/perf_check_spec.rb:24:in `block (3 levels) in <top (required)>'
# ./spec/perf_check_spec.rb:24:in `block (3 levels) in <top (required)>'
Finished in 2 minutes 43.8 seconds (files took 0.2189 seconds to load)
69 examples, 4 failures, 11 pending
Failed examples:
rspec ./spec/perf_check/git_spec.rb:99 # PerfCheck::Git#stash_if_needed should call git stash if there are changes
rspec ./spec/perf_check/git_spec.rb:131 # PerfCheck::Git#migrations_to_run_down should list those versions on current_branch which are not on master
rspec ./spec/perf_check/middleware_spec.rb:31 # PerfCheck::Middleware#call when backend raises exception should insert X-PerfCheck-StackTrace header with path to backtrace
rspec ./spec/perf_check_spec.rb:19 # PerfCheck#load_config should rescue exceptions from the config file
Can you confirm that they fail for you too.
Specs in master are now green (not yet in CI, working on that!) — so this is next on my radar!
Sometimes I want to check whether a new path performs better than an old path. This new config allows that :)
usage perf_check /posts/ /posts/1 --compare_paths New config compares paths to each other
Example: