From 9e9b49c25096a4813283aae1566c2f3356cd5624 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn-Egil=20Dahlberg?= Date: Thu, 18 Jul 2013 16:19:26 +0200 Subject: os_mon: Relax disksup_SUITE api test --- lib/os_mon/test/disksup_SUITE.erl | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) (limited to 'lib') diff --git a/lib/os_mon/test/disksup_SUITE.erl b/lib/os_mon/test/disksup_SUITE.erl index c1ff2c6afc..b5f3e6872b 100644 --- a/lib/os_mon/test/disksup_SUITE.erl +++ b/lib/os_mon/test/disksup_SUITE.erl @@ -78,19 +78,28 @@ end_per_group(_GroupName, Config) -> Config. -api(suite) -> - []; -api(doc) -> - ["Test of API functions"]; +api(suite) -> []; +api(doc) -> ["Test of API functions"]; api(Config) when is_list(Config) -> %% get_disk_data() - ?line [{Id, KByte, Capacity}|_] = disksup:get_disk_data(), - ?line true = io_lib:printable_list(Id), - ?line true = is_integer(KByte), - ?line true = is_integer(Capacity), - ?line true = KByte>0, - ?line true = Capacity>0, + Data = disksup:get_disk_data(), + case lists:keysearch("/ldisk", 1, Data) of + {value,{Id,KByte,Capacity}} -> + true = io_lib:printable_list(Id), + true = is_integer(KByte), + true = is_integer(Capacity), + true = Capacity>0, + true = KByte>0; + _ -> + [{Id, KByte, Capacity}|_] = Data, + true = io_lib:printable_list(Id), + true = is_integer(KByte), + true = is_integer(Capacity), + % can be zero + % true = Capacity>0, + true = KByte>0 + end, %% get_check_interval() ?line 1800000 = disksup:get_check_interval(), -- cgit v1.2.3