Skip to content
This repository has been archived by the owner on Oct 28, 2024. It is now read-only.

Commit

Permalink
fixxx
Browse files Browse the repository at this point in the history
  • Loading branch information
davidsiaw committed Apr 1, 2024
1 parent 513c2fd commit 4609d82
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/kaiser/cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,7 @@ def network

def container_dead?(container)
x = JSON.parse(`docker inspect #{container} 2>/dev/null`)
return true if x.empty? || x[0]['State']['Running'] == false
x.empty? || x[0]['State']['Running'] == false
end

def if_container_dead(container)
Expand Down
2 changes: 1 addition & 1 deletion lib/kaiser/cmds/shutdown.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def usage
end

def execute(_opts)
Config.config[:shared_names].each do |_, container_name|
Config.config[:shared_names].each_value do |container_name|
killrm container_name
end

Expand Down
6 changes: 3 additions & 3 deletions spec/cli_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,19 +51,19 @@
it 'for x86 machines returns normal selenium' do
cli = Kaiser::Cli.new
stub_const('RUBY_PLATFORM', 'x86_64-linux')
expect(cli.selenium_node_image).to eq('selenium/standalone-chrome-debug')
expect(cli.send(:selenium_node_image)).to eq('selenium/standalone-chrome-debug')
end

it 'for arm machines on mac' do
cli = Kaiser::Cli.new
stub_const('RUBY_PLATFORM', 'arm64-darwin23')
expect(cli.selenium_node_image).to eq('seleniarm/standalone-chromium')
expect(cli.send(:selenium_node_image)).to eq('seleniarm/standalone-chromium')
end

it 'for arm machines on linux' do
cli = Kaiser::Cli.new
stub_const('RUBY_PLATFORM', 'arch64-linux')
expect(cli.selenium_node_image).to eq('seleniarm/standalone-chromium')
expect(cli.send(:selenium_node_image)).to eq('seleniarm/standalone-chromium')
end
end
end

0 comments on commit 4609d82

Please sign in to comment.