Code

Let the network protocol and SysQL support last_update for metric stores.
[sysdb.git] / t / unit / parser / parser_test.c
index 8da4ef0cc722a639e178d9714c89fa0ee16b0395..14977ff820f91e63dfc69b822fdcf98f2ebc5c38 100644 (file)
@@ -31,7 +31,7 @@
 
 #include "parser/parser.h"
 #include "core/object.h"
-#include "core/store.h"
+#include "core/memstore.h"
 #include "testutils.h"
 
 #include <check.h>
@@ -220,6 +220,11 @@ struct {
          "STORE 'typ' 'id' "
          "LAST UPDATE "
          "2015-02-01",          -1,  1, SDB_AST_TYPE_STORE, SDB_METRIC },
+       { "STORE metric "
+         "'host'.'metric' "
+         "STORE 'typ' 'id' 2015-02-01 13:37 "
+         "LAST UPDATE "
+         "2015-02-01",          -1,  1, SDB_AST_TYPE_STORE, SDB_METRIC },
        { "STORE metric attribute "
          "'host'.'metric'.'key' "
          "123",                 -1,  1, SDB_AST_TYPE_STORE, SDB_ATTRIBUTE },
@@ -678,7 +683,7 @@ START_TEST(test_parse)
        sdb_strbuf_t *errbuf = sdb_strbuf_create(64);
        sdb_llist_t *check;
        sdb_ast_node_t *node;
-       sdb_store_query_t *q;
+       sdb_memstore_query_t *q;
        _Bool ok;
 
        check = sdb_parser_parse(parse_data[_i].query,
@@ -741,9 +746,9 @@ START_TEST(test_parse)
        }
 
        /* TODO: this should move into front-end specific tests */
-       q = sdb_store_query_prepare(node);
+       q = sdb_memstore_query_prepare(node);
        fail_unless(q != NULL,
-                       "sdb_store_query_prepare(AST<%s>) = NULL; expected: <query>",
+                       "sdb_memstore_query_prepare(AST<%s>) = NULL; expected: <query>",
                        parse_data[_i].query);
 
        sdb_object_deref(SDB_OBJ(node));