Commit 523577b4 authored by Andrea Valassi's avatar Andrea Valassi
Browse files

Add a test for CORALCOOL-2831


git-svn-id: file:///git/lcgcool.svndb/cool/trunk@19823 4525493e-7705-40b1-a816-d608a930855b
parent 7e32ad33
......@@ -44,6 +44,7 @@ private:
CPPUNIT_TEST( test_createParentsFalse ); // DDL
CPPUNIT_TEST( test_svFolder );
CPPUNIT_TEST( test_listTags );
CPPUNIT_TEST( test_bug2831 );
CPPUNIT_TEST( test_resolveLocalTag );
CPPUNIT_TEST( test_resolveTagFails );
CPPUNIT_TEST( test_tagRelationExists );
......@@ -658,7 +659,7 @@ public:
// -> folder '/A/mX version #2'
std::string tA_2 = "/A version #2";
std::string tAM_2 = "/A/mX version #2";
fAM->createTagRelation( tA_2, tAM_2 );
fAM->createTagRelation( tA_2, tAM_2 ); // This fails in CORALCOOL-2831
// Tag hierarchy for "/ version PROD"
// -> fldset '/ version PROD'
// -> fldset '/A version PROD'
......@@ -699,6 +700,38 @@ public:
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
void test_bug2831() // Instrumented version of test_listTags
{
try {
// Node hierarchy
// -> fldset /
// -> fldset /A
// -> folder /A/mX
// -> folder /A/sX
IFolderSetPtr sA = s_db->getFolderSet( "/A" );
IFolderPtr fAM = getAndFillFolder( "/A/mX" );
IFolderPtr fAS = getAndFillFolder( "/A/sX" );
// Tag hierarchy for "/A version #1"
// -> fldset '/A version #1'
// -> folder '/A/mX version #1'
std::string tA_1 = "/A version #1";
std::string tAM_1 = "/A/mX version #1";
fAM->createTagRelation( tA_1, tAM_1 );
// Tag hierarchy for "/A version #2"
// -> fldset '/A version #2'
// -> folder '/A/mX version #2'
std::string tA_2 = "/A version #2";
std::string tAM_2 = "/A/mX version #2";
fAM->createTagRelation( tA_2, tAM_2 ); // This fails in CORALCOOL-2831
}
catch ( std::exception& e ) {
std::cout << "Exception caught: '" << e.what() << "'" << std::endl;
throw;
}
}
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// Test for bug #16566
void test_resolveLocalTag()
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment