From 5407e589678482b5f4610b0e45a171b63142a097 Mon Sep 17 00:00:00 2001 From: "Ruben S. Montero" Date: Fri, 14 Oct 2011 13:16:49 +0200 Subject: [PATCH] bug #847 - #913: Fixes Images Unit Tests. --- src/image/Image.cc | 2 +- src/image/test/ImagePoolTest.cc | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/image/Image.cc b/src/image/Image.cc index 36d509aa52..7393935683 100644 --- a/src/image/Image.cc +++ b/src/image/Image.cc @@ -42,7 +42,7 @@ Image::Image(int _uid, PoolObjectSQL(-1,"",_uid,_gid,_uname,_gname,table), type(OS), regtime(time(0)), - source("-"), + source(""), path(""), fs_type(""), size_mb(0), diff --git a/src/image/test/ImagePoolTest.cc b/src/image/test/ImagePoolTest.cc index 1b61ff193a..4564f30339 100644 --- a/src/image/test/ImagePoolTest.cc +++ b/src/image/test/ImagePoolTest.cc @@ -50,22 +50,22 @@ const string templates[] = "PROFILE = STUDENT\n" }; - const string xmls[] = { - "001oneoneadminImage one0010000000000-040", +"001oneoneadminImage one0010000000000/tmp/image_test040", - "111twooneadminSecond Image0100000000000-040", +"111twooneadminSecond Image0100000000000/tmp/image_second_test040", - "021threeusersThe third image0000000000000-040" +"021threeusersThe third image0000000000000/tmp/image_test040", }; // This xml dump result has the STIMEs modified to 0000000000 const string xml_dump = -"001oneoneadminImage one0010000000000-040111twooneadminSecond Image0100000000000-040221threeusersThe third image0000000000000-040"; +"001oneoneadminImage one0010000000000/tmp/image_test040111twooneadminSecond Image0100000000000/tmp/image_second_test040221threeusersThe third image0000000000000/tmp/image_test040"; + const string xml_dump_where = -"001oneoneadminImage one0010000000000-040111twooneadminSecond Image0100000000000-040"; +"001oneoneadminImage one0010000000000/tmp/image_test040111twooneadminSecond Image0100000000000/tmp/image_second_test040"; /* ************************************************************************* */ /* ************************************************************************* */ @@ -554,7 +554,7 @@ public: value = ""; value = disk->vector_value("SOURCE"); - CPPUNIT_ASSERT( value == "-" ); + CPPUNIT_ASSERT( value == "" ); // clean up //img->release_image(); @@ -574,7 +574,7 @@ public: value = ""; value = disk->vector_value("SOURCE"); - CPPUNIT_ASSERT( value == "-" ); + CPPUNIT_ASSERT( value == "" ); // clean up delete disk;