try to get usefull output on error
[opensuse:spacewalk-testsuite-base.git] / features / step_definitions / weak_deps_steps.rb
1 # Copyright (c) 2010-2011 Novell, Inc.
2 # Licensed under the terms of the MIT license.
3
4 When /^I refresh the metadata$/ do
5    output = `rhn_check -vvv 2>&1`
6    if ! $?.success?
7        raise "rhn_check failed: #{$!}: #{output}"
8    client_refresh_metadata
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} #{client_raw_repodata_dir("sles11-sp1-updates-#{arch}-channel")}/primary.xml.gz`
18    fail if ! $?.success?
19 end
20