query events unit test
authorJiří Škrábal <nykolas@ics.muni.cz>
Thu, 23 Sep 2004 07:59:43 +0000 (07:59 +0000)
committerJiří Škrábal <nykolas@ics.muni.cz>
Thu, 23 Sep 2004 07:59:43 +0000 (07:59 +0000)
org.glite.lb.server/test/test_query_events.cpp

index 00fb6e8..0a20d86 100644 (file)
@@ -21,9 +21,12 @@ class QueryEventsTest: public CppUnit::TestFixture
 
 private:
        edg_wll_Context ctx;
+       vector<pair<string,vector<string>>>     expQueries;
+       int                                     queryIdx;
 
 public:
        void oneJob();
+       int ExecStmt(const char *, edg_wll_Stmt *);
 
        void setUp() {
                edg_wll_InitContext(&ctx);
@@ -43,15 +46,27 @@ void QueryEventsTest::oneJob()
        edg_wlc_JobIdParse("https://fake.server/fake_job",&job[0].value.j);
        job[1].attr = EDG_WLL_QUERY_ATTR_UNDEF;
 
+       expQueries.clear();
+       /*
+        *      XXX: ...
+        */
+       expQueries.push_back();
        CPPUNIT_ASSERT(!edg_wll_QueryEventsServer(ctx,1,jobs,NULL,&events));
 }
 
+int QueryEventsTest::ExecStmt(const char *, edg_wll_Stmt *)
+{
+       return 0;
+}
+
 extern "C" {
 
 int edg_wll_ExecStmt(edg_wll_Context ctx,char *qry,edg_wll_Stmt *stmt)
 {
        cout << qry << endl;
-       return 0;
+
+       class QueryEventsTest *tst = (class QueryEventsTest *)(ctx->mysql);
+       return tst->ExecStmt(qry, stmt);
 }
 
 int edg_wll_FetchRow(edg_wll_Stmt stmt, char **cols)