Skip to content

Commit

Permalink
Attempt to fix integration specs on postgres on ci
Browse files Browse the repository at this point in the history
  • Loading branch information
segiddins committed Jul 22, 2024
1 parent 604160d commit 88c97fc
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 0 additions & 2 deletions lib/gemstash/compact_index_builder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,6 @@ def compact_index_versions(date)
ORDER BY date, number, platform, name
SQL

# not ordered correctly in sqlite for some reason
all_versions.sort_by! {|v| [v[:date], v[:number], v[:platform], v[:name]] }
map_gem_versions(all_versions.map {|v| [v[:name], [v]] })
end

Expand Down
2 changes: 1 addition & 1 deletion spec/integration_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@
shared_examples "a bundleable project" do
it "successfully bundles" do
env = { "HOME" => dir }
expect(execute("bundle", dir: dir, env: env)).to exit_success
expect(execute("bundle", %w[install --verbose], dir: dir, env: env)).to exit_success
expect(execute("bundle", %w[exec speaker hi], dir: dir, env: env)).
to exit_success.and_output("Hello world, #{platform_message}\n")
end
Expand Down
9 changes: 6 additions & 3 deletions spec/support/exec_helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def execute(command, args = [], dir: nil, env: {})

# Executes and stores the results for an external command.
class Result
attr_reader :command, :args, :dir, :output
attr_reader :command, :args, :dir, :output, :err

def initialize(env, command, args, dir)
@command = command
Expand All @@ -29,7 +29,7 @@ def initialize(env, command, args, dir)
end

def exec
@output, @status = Open3.capture2(patched_env, command, *args, chdir: dir)
@output, @err, @status = Open3.capture3(patched_env, command, *args, chdir: dir)
end

def successful?
Expand Down Expand Up @@ -148,7 +148,10 @@ def exec_in_process(binstub)
else
"expected '#{actual.display_command}' in '#{actual.dir}' to exit with a success code, but it didn't.
the command output was:
#{actual.output}"
#{actual.output}
and the error was:
#{actual.err}"
end
end
end

0 comments on commit 88c97fc

Please sign in to comment.