check_oracle_health: update to 1.9.2
[omd.git] / t / 11-omd_update.t
blob1672d5341f4ff4de903449ec89567790072abd29
1 #!/usr/bin/env perl
3 use warnings;
4 use strict;
5 use Test::More;
6 use Data::Dumper;
8 BEGIN {
9 use lib('t');
10 require TestUtils;
11 import TestUtils;
12 use FindBin;
13 use lib "$FindBin::Bin/lib/lib/perl5";
16 plan skip_all => 'Author test. Set $ENV{TEST_AUTHOR} to a true value to run.' unless $ENV{TEST_AUTHOR};
17 plan( tests => 12 );
19 my $omd_bin = TestUtils::get_omd_bin();
20 my $site = TestUtils::create_test_site() or TestUtils::bail_out_clean("no further testing without site");
21 my $versions_test = { cmd => $omd_bin." versions"};
22 TestUtils::test_command($versions_test);
23 my @versions = $versions_test->{'stdout'} =~ m/(^[0-9\.]+)$/mxg;
24 SKIP: {
25 skip("cannot test update with only one version installed", 3) if scalar @versions == 0;
26 TestUtils::test_command({ cmd => $omd_bin." -V $versions[0] update $site" });
29 ##################################################
30 # cleanup test site
31 TestUtils::remove_test_site($site);