mirror of
https://github.com/fwbuilder/fwbuilder
synced 2026-09-15 09:29:36 +02:00
additional unit test for run_time_address_tables configlet
This commit is contained in:
@@ -367,7 +367,26 @@ void GeneratedScriptTest::virtualAddressesForNat2Test()
|
||||
delete objdb;
|
||||
}
|
||||
|
||||
void GeneratedScriptTest::runTimeAddressTablesWithIpSetTest()
|
||||
/*
|
||||
* negative test first. test6 does not use ipset module and the configlet should
|
||||
* only insert blank function check_run_time_address_table_files()
|
||||
*/
|
||||
void GeneratedScriptTest::runTimeAddressTablesWithIpSet1Test()
|
||||
{
|
||||
objdb = new FWObjectDatabase();
|
||||
runCompiler("test1.fwb", "test6", "test6.fw");
|
||||
|
||||
QString res = Configlet::findConfigletInFile("run_time_address_tables", "test6.fw");
|
||||
CPPUNIT_ASSERT(!res.isEmpty());
|
||||
int n1 = res.indexOf("load_run_time_address_table_files() {");
|
||||
CPPUNIT_ASSERT(n1 == -1);
|
||||
n1 = res.indexOf("check_run_time_address_table_files() {");
|
||||
CPPUNIT_ASSERT(n1 != -1);
|
||||
|
||||
delete objdb;
|
||||
}
|
||||
|
||||
void GeneratedScriptTest::runTimeAddressTablesWithIpSet2Test()
|
||||
{
|
||||
QStringList sample_1;
|
||||
|
||||
|
||||
@@ -57,7 +57,8 @@ public:
|
||||
void configureInterfacesClusterTest();
|
||||
void virtualAddressesForNat1Test();
|
||||
void virtualAddressesForNat2Test();
|
||||
void runTimeAddressTablesWithIpSetTest();
|
||||
void runTimeAddressTablesWithIpSet1Test();
|
||||
void runTimeAddressTablesWithIpSet2Test();
|
||||
|
||||
CPPUNIT_TEST_SUITE(GeneratedScriptTest);
|
||||
CPPUNIT_TEST(ManifestTest);
|
||||
@@ -68,7 +69,8 @@ public:
|
||||
CPPUNIT_TEST(configureInterfacesClusterTest);
|
||||
CPPUNIT_TEST(virtualAddressesForNat1Test);
|
||||
CPPUNIT_TEST(virtualAddressesForNat2Test);
|
||||
CPPUNIT_TEST(runTimeAddressTablesWithIpSetTest);
|
||||
CPPUNIT_TEST(runTimeAddressTablesWithIpSet1Test);
|
||||
CPPUNIT_TEST(runTimeAddressTablesWithIpSet2Test);
|
||||
CPPUNIT_TEST_SUITE_END();
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user