コード例 #1
0
ファイル: test-pong.cpp プロジェクト: bsletten/monarch
static bool run(TestRunner& tr)
{
   if(tr.isTestEnabled("pong"))
   {
      runPingTest(tr);
   }
   return true;
}
コード例 #2
0
static bool run(TestRunner& tr)
{
   if(tr.isTestEnabled("fixme"))
   {
      // load and start node
      Node* node = Tester::loadNode(tr, "test-services-customcatalog");
      assertNoException(
         node->start());

      Config cfg = tr.getApp()->getConfig();
      sTestDataDir = cfg["test"]["dataPath"]->getString();

      //config["node"]["modulePath"] = append BPE_MODULES_DIRECTORY;
      //config["bitmunk.catalog.CustomCatalog"]["uploadListings"] = false;

      // run tests
      customCatalogTests(*node, tr);

      // stop and unload node
      node->stop();
      Tester::unloadNode(tr);
   }

   if(tr.isTestEnabled("fixme"))
   {
      // load and start node
      Node* node = Tester::loadNode(tr, "test-services-customcatalog");
      assertNoException(
         node->start());

      Config cfg = tr.getApp()->getConfig();
      sTestDataDir = cfg["test"]["dataPath"]->getString();

      //config["node"]["modulePath"] = BPE_MODULES_DIRECTORY;
      //config["bitmunk.catalog.CustomCatalog"]["uploadListings"] = true;

      // run tests
      interactiveCustomCatalogTests(*node, tr);

      // stop and unload node
      node->stop();
      Tester::unloadNode(tr);
   }

   return true;
};
コード例 #3
0
ファイル: test-ws.cpp プロジェクト: bsletten/monarch
static bool run(TestRunner& tr)
{
   if(tr.isTestEnabled("ws-server"))
   {
      runWebServerTest(tr);
   }
   return true;
}
コード例 #4
0
ファイル: test-fiber-yield.cpp プロジェクト: bsletten/monarch
static bool run(TestRunner& tr)
{
   if(tr.isTestEnabled("fiber-yield"))
   {
      runFiberYieldTest(tr);
   }
   return true;
}
コード例 #5
0
ファイル: test-http.cpp プロジェクト: bsletten/monarch
static bool run(TestRunner& tr)
{
   if(tr.isDefaultEnabled())
   {
      runHttpHeaderTest(tr);
      runHttpNormalizePath(tr);
      runCookieTest(tr);
   }
   if(tr.isTestEnabled("http-server"))
   {
      runHttpServerTest(tr);
   }
   if(tr.isTestEnabled("http-pong"))
   {
      runHttpPongTest(tr);
   }
   if(tr.isTestEnabled("http-client-get"))
   {
      runHttpClientGetTest(tr);
   }
   if(tr.isTestEnabled("http-client-redirect-loop"))
   {
      runHttpClientRedirectLoopTest(tr);
   }
   if(tr.isTestEnabled("http-client-post"))
   {
      runHttpClientPostTest(tr);
   }
   if(tr.isTestEnabled("ping"))
   {
      runPingTest(tr);
   }
   return true;
}
コード例 #6
0
static bool run(TestRunner& tr)
{
   if(tr.isTestEnabled("dyno-perf"))
   {
      Config cfg = tr.getApp()->getConfig();
      // number of loops for each test
      int loops = cfg->hasMember("loops") ? cfg["loops"]->getInt32() : 1;
      for(int i = 0; i < loops; ++i)
      {
         runDynoIterTest(tr);
      }
   }
   return true;
}
コード例 #7
0
ファイル: test-config.cpp プロジェクト: digitalbazaar/bitmunk
static bool run(TestRunner& tr)
{
   if(tr.isTestEnabled("login-required"))
   {
      // load bitmunk node
      Node* node = Tester::loadNode(tr);
      assertNoException(
         node->start());

      // run config test
      runConfigTest(*node, tr);

      // unload bitmunk node
      node->stop();
      Tester::unloadNode(tr);
      assertNoExceptionSet();
   }
   return true;
}
コード例 #8
0
static bool run(TestRunner& tr)
{
   if(tr.isTestEnabled("fixme"))
   {
      // load and start node
      Node* node = Tester::loadNode(tr/*, "test-node-services"*/);
      assertNoException(
         node->start());

      //cout << "You may need to remove testuser5.profile from /tmp/ to "
      //   "run the password update test." << endl;

      // login the devuser
      //node.login("devuser", "password");
      //node.login("testuser5", "password");
      assertNoExceptionSet();

      // run tests
      //mediaGetTest(node, tr);
      //userGetTest(node, tr);
      //userAddTest(node, tr);
      //userUpdateTest(node, tr);
      //accountGetTest(node, tr);
      //contributorGetTest(node, tr);
      //permissionGetTest(node, tr);
      //reviewGetTest(node, tr);
      //acquireLicenseTest(node, tr);

      // performance tests
      //accountGetPerfTest(node, tr);

      // stop and unload node
      node->stop();
      Tester::unloadNode(tr);
   }

   if(tr.isTestEnabled("fixme"))
   {
      // load and start node
      Node* node = Tester::loadNode(tr/*, "test-node-services"*/);
      assertNoException(
         node->start());

      // login the devuser
      //node.login("devuser", "password");
      //node.login("testuser5", "password");
      assertNoExceptionSet();

      Config cfg = tr.getApp()->getConfig();
      const char* test = cfg["monarch.test.Tester"]["test"]->getString();
      bool all = (strcmp(test, "all") == 0);

      if(all || (strcmp(test, "ping") == 0))
      {
         pingPerfTest(*node, tr);
      }

      // stop and unload node
      node->stop();
      Tester::unloadNode(tr);
   }

   return true;
};