let tests work also on i586
[opensuse:spacewalk-testsuite-base.git] / features / step_definitions / weak_deps_steps.rb
1
2 When /^I refresh the metadata$/ do
3    `rhn_check`
4    fail if ! $?.success?
5    `yum clean all`
6    fail if ! $?.success?
7    `yum makecache`
8    fail if ! $?.success?
9 end
10
11 Then /^I should have "([^"]*)" in the metadata$/ do |text|
12    arch=`uname -m`
13    arch.chomp!
14    if arch != "x86_64"
15      arch = "i586"
16    end
17    `zgrep #{text} /var/cache/yum/sles11-sp1-updates-#{arch}-channel/primary.xml.gz`
18    fail if ! $?.success?
19 end
20