Skip to content

Commit

Permalink
Fix rails test on tumbleweed
Browse files Browse the repository at this point in the history
libyaml-devel is now required to be installed to instanciate
the rails scaffold
  • Loading branch information
dirkmueller committed Oct 24, 2023
1 parent 9775d00 commit 2cb4965
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions tests/test_ruby.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def test_rails_hello_world(auto_container_per_test):

# Rails asset pipeline needs Node.js and yarn
auto_container_per_test.connection.run_expect(
[0], "zypper -n in nodejs-default yarn"
[0], "zypper -n in nodejs-default yarn libyaml-devel"
)
auto_container_per_test.connection.run_expect(
[0], "rails new /hello/ --minimal"
Expand All @@ -90,6 +90,11 @@ def test_rails_hello_world(auto_container_per_test):

@pytest.mark.skipif(OS_VERSION != "tumbleweed", reason="no rails for ruby 2.5")
def test_rails_template(auto_container_per_test):
# Rails asset pipeline needs Node.js and yarn
auto_container_per_test.connection.run_expect(
[0], "zypper -n in nodejs-default yarn libyaml-devel"
)

auto_container_per_test.connection.run_expect(
[0], "gem install 'rails:~> 7.0'"
)
Expand All @@ -111,9 +116,6 @@ def test_rails_template(auto_container_per_test):
):
pytest.xfail("timezone data are not in the container")

curl_localhost = auto_container_per_test.connection.run_expect(
[0],
assert "Ruby on Rails" in auto_container_per_test.connection.check_output(
"cd /hello/ && (rails server > /dev/null &) && curl -sf --retry 5 --retry-connrefused http://localhost:3000",
)

assert "Ruby on Rails" in curl_localhost.stdout.strip()

0 comments on commit 2cb4965

Please sign in to comment.