dbaccess_parser_unittest.cc 24 KB
Newer Older
1
// Copyright (C) 2012-2015 Internet Systems Consortium, Inc. ("ISC")
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
// copyright notice and this permission notice appear in all copies.
//
// THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
// REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
// AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
// INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
// LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
// PERFORMANCE OF THIS SOFTWARE.

#include <config.h>

17
#include <cc/command_interpreter.h>
18
#include <dhcpsrv/lease_mgr_factory.h>
19
#include <dhcpsrv/parsers/dbaccess_parser.h>
20
#include <dhcpsrv/tests/mysql_schema.h>
21
#include <dhcpsrv/host_mgr.h>
22
#include <log/logger_support.h>
23

24
25
#include <gtest/gtest.h>

26
27
28
29
30
31
#include <map>
#include <string>

using namespace std;
using namespace isc;
using namespace isc::dhcp;
32
using namespace isc::dhcp::test;
33
34
35
36
37
38
39
40
using namespace isc::data;
using namespace isc::config;

namespace {

/// @brief Database Access Parser test fixture class
class DbAccessParserTest : public ::testing::Test {
public:
41
42
43
44
45
46
47
48
49
50
51
    /// @brief Constructor
    ///
    /// Just make sure that the lease database is closed before every test
    /// (the first in particular).
    DbAccessParserTest() {
        LeaseMgrFactory::destroy();
    }
    /// @brief Destructor
    ///
    /// Just make sure that the lease database is closed after every test
    /// (the last in particular).
52
53
54
55
    ///
    /// As some of the tests have the side-effect of altering the logging
    /// settings (when the parser's "build" method is called), ensure that
    /// the logging is reset to the default after each test completes.
56
57
    ~DbAccessParserTest() {
        LeaseMgrFactory::destroy();
58
        isc::log::setDefaultLoggingOutput();
59
60
61
    }

    /// @brief Build JSON String
62
63
64
65
66
    ///
    /// Given a array of "const char*" strings representing in order, keyword,
    /// value, keyword, value, ... and terminated by a NULL, return a string
    /// that represents the JSON map for the keywords and values.
    ///
67
68
69
    /// E.g. given the array of strings: alpha, one, beta, two, NULL, it would
    /// return the string '{ "alpha": "one", "beta": "two" }'
    ///
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
    /// @param keyval Array of "const char*" strings in the order keyword,
    ///        value, keyword, value ...  A NULL entry terminates the list.
    ///
    /// @return JSON map for the keyword value array.
    std::string toJson(const char* keyval[]) {
        const std::string quote = "\"";
        const std::string colon = ":";
        const std::string space = " ";

        string result = "{ ";

        for (size_t i = 0; keyval[i] != NULL; i+= 2) {
            // Get the value.  This should not be NULL.  As ASSERT_NE will
            // cause a return - which gives compilation problems as a return
            // statement is expected to return a string - use EXPECT_NE and
            // explicitly return if the expected array is incorrect.
            EXPECT_NE(static_cast<const char*>(NULL), keyval[i + 1]) <<
                "Supplied reference keyword/value list does not contain values "
                "for all keywords";
            if (keyval[i + 1] == NULL) {
                return (std::string(""));
            }

            // Add the separating comma if not the first.
            if (i != 0) {
                result += ", ";
            }

            // Add the keyword and value - make sure that they are quoted.
99
100
            // The parameters which are not quoted are persist and
            // lfc-interval as they are boolean and integer respectively.
101
            result += quote + keyval[i] + quote + colon + space;
102
            if (!quoteValue(std::string(keyval[i]))) {
103
                result += keyval[i + 1];
104
105
106

            } else {
                result += quote + keyval[i + 1] + quote;
107
            }
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
        }

        // Add the terminating brace
        result += " }";

        return (result);
    }

    /// @brief Check for Keywords
    ///
    /// Takes a database access string and checks it against a list of keywords
    /// and values.  It checks that:
    ///
    /// a. Every keyword in the string appears once and only once in the
    ///    list.
    /// b. Every keyword in the list appears in the string.
    /// c. Every keyword's value is the same as that in the string.
    ///
    /// To parse the access string, we use the parsing function in the
    /// DHCP lease manager.
    ///
    /// @param trace_string String that will be used to set the value of a
    ///        SCOPED_TRACE for this call.
131
    /// @param dbaccess set of database access parameters to check
132
133
    /// @param keyval Array of "const char*" strings in the order keyword,
    ///        value, keyword, value ...  A NULL entry terminates the list.
134
    /// @param u Universe (V4 or V6).
135
136
    void checkAccessString(const char* trace_string,
                           const DbAccessParser::StringPairMap& parameters,
137
138
                           const char* keyval[],
                           Option::Universe u = Option::V4) {
139
140
        SCOPED_TRACE(trace_string);

141
        // Construct a map of keyword value pairs.
142
        std::map<string, string> expected;
143
144
145
        expected["universe"] = (u == Option::V4 ? "4" : "6");
        // The universe is always injected by the parser itself.
        size_t expected_count = 1;
146
147
148
149
150
151
152
153
154
155
156
        for (size_t i = 0; keyval[i] != NULL; i += 2) {
            // Get the value.  This should not be NULL
            ASSERT_NE(static_cast<const char*>(NULL), keyval[i + 1]) <<
                "Supplied reference keyword/value list does not contain values "
                "for all keywords";
            expected[keyval[i]] = keyval[i + 1];

            // One more keyword processed
            ++expected_count;
        }

157
        // Check no duplicates in the test set of reference keywords.
158
        ASSERT_EQ(expected_count, expected.size()) <<
159
160
            "Supplied reference keyword/value list contains duplicate keywords";

161
162
163
        // The passed parameter map should have the same number of entries as
        // the reference set of keywords.
        EXPECT_EQ(expected_count, parameters.size());
164
165
166

        // Check that the keywords and keyword values are the same: loop
        // through the keywords in the database access string.
167
        for (DatabaseConnection::ParameterMap::const_iterator actual = parameters.begin();
168
             actual != parameters.end(); ++actual) {
169
170

            // Does the keyword exist in the set of expected keywords?
171
            std::map<string, string>::iterator corresponding =
172
173
174
175
176
177
178
                expected.find(actual->first);
            ASSERT_TRUE(corresponding != expected.end());

            // Keyword exists, is the value the same?
            EXPECT_EQ(corresponding->second, actual->second);
        }
    }
179
180
181

private:

182
183
    /// @brief Checks if the value of the specified parameter should be
    /// quoted in the configuration.
184
    ///
185
186
187
188
189
    /// @param parameter A parameter for which it should be checked whether
    /// the value should be quoted or not.
    ///
    /// @return true if the value of the parameter should be quoted.
     bool quoteValue(const std::string& parameter) const {
190
         return ((parameter != "persist") && (parameter != "lfc-interval"));
191
192
    }

193
194
};

195
196
197

/// @brief Version of parser with protected methods public
///
198
199
200
/// Some of the methods in DbAccessParser are not required to be public in Kea.
/// Instead of being declared "private", they are declared "protected" so that
/// they can be accessed through a derived class in the unit tests.
201
202
203
204
205
206
class TestDbAccessParser : public DbAccessParser {
public:

    /// @brief Constructor
    ///
    /// @brief Keyword/value collection of ddatabase access parameters
207
208
209
    TestDbAccessParser(const std::string& param_name, DbAccessParser::DBType type,
                       const ParserContext& ctx)
        : DbAccessParser(param_name, type, ctx)
210
211
212
213
214
215
    {}

    /// @brief Destructor
    virtual ~TestDbAccessParser()
    {}

216
217
218
219
    /// Allow use of superclass's protected functions.
    using DbAccessParser::getDbAccessParameters;
    using DbAccessParser::getDbAccessString;

220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
    /// @brief Get database access parameters
    ///
    /// Used in testing to check that the configuration information has been
    /// parsed corrected.
    ///
    /// @return Map of keyword/value pairs representing database access
    ///         information.
    const StringPairMap& getDbAccessParameters() const {
        return (DbAccessParser::getDbAccessParameters());
    }

    /// @brief Construct database access string
    ///
    /// Constructs the database access string from the stored parameters.
    ///
    /// @return Database access string
    std::string getDbAccessString() const {
        return (DbAccessParser::getDbAccessString());
    }
};

241
// Check that the parser works with a simple configuration.
242
TEST_F(DbAccessParserTest, validTypeMemfile) {
243
244
245
246
247
248
249
    const char* config[] = {"type", "memfile",
                            NULL};

    string json_config = toJson(config);
    ConstElementPtr json_elements = Element::fromJSON(json_config);
    EXPECT_TRUE(json_elements);

250
251
    TestDbAccessParser parser("lease-database", DbAccessParser::LEASE_DB,
                              ParserContext(Option::V4));
252
    EXPECT_NO_THROW(parser.build(json_elements));
253
254
255
256
257
258
259
260
261
262
263
264
265
266
    checkAccessString("Valid memfile", parser.getDbAccessParameters(), config);
}

// Check that the parser works with a simple configuration that
// includes empty elements.
TEST_F(DbAccessParserTest, emptyKeyword) {
    const char* config[] = {"type", "memfile",
                            "name", "",
                            NULL};

    string json_config = toJson(config);
    ConstElementPtr json_elements = Element::fromJSON(json_config);
    EXPECT_TRUE(json_elements);

267
268
    TestDbAccessParser parser("lease-database", DbAccessParser::LEASE_DB,
                              ParserContext(Option::V4));
269
270
    EXPECT_NO_THROW(parser.build(json_elements));
    checkAccessString("Valid memfile", parser.getDbAccessParameters(), config);
271
272
}

273
274
275
276
277
// Check that the parser works with more complex configuration when
// lease file path is specified for DHCPv4.
TEST_F(DbAccessParserTest, persistV4Memfile) {
    const char* config[] = {"type", "memfile",
                            "persist", "true",
278
                            "name", "/opt/kea/var/kea-leases4.csv",
279
280
281
282
283
284
                            NULL};

    string json_config = toJson(config);
    ConstElementPtr json_elements = Element::fromJSON(json_config);
    EXPECT_TRUE(json_elements);

285
286
    TestDbAccessParser parser("lease-database", DbAccessParser::LEASE_DB,
                              ParserContext(Option::V4));
287
288
289
290
291
292
293
294
295
296
297
    EXPECT_NO_THROW(parser.build(json_elements));

    checkAccessString("Valid memfile", parser.getDbAccessParameters(),
                      config);
}

// Check that the parser works with more complex configuration when
// lease file path is specified for DHCPv6.
TEST_F(DbAccessParserTest, persistV6Memfile) {
    const char* config[] = {"type", "memfile",
                            "persist", "true",
298
                            "name", "/opt/kea/var/kea-leases6.csv",
299
300
301
302
303
304
                            NULL};

    string json_config = toJson(config);
    ConstElementPtr json_elements = Element::fromJSON(json_config);
    EXPECT_TRUE(json_elements);

305
306
    TestDbAccessParser parser("lease-database", DbAccessParser::LEASE_DB,
                              ParserContext(Option::V6));
307
308
309
310
311
312
    EXPECT_NO_THROW(parser.build(json_elements));

    checkAccessString("Valid memfile", parser.getDbAccessParameters(),
                      config, Option::V6);
}

313
314
315
316
317
318
319
320
321
322
323
324
// This test checks that the parser accepts the valid value of the
// lfc-interval parameter.
TEST_F(DbAccessParserTest, validLFCInterval) {
    const char* config[] = {"type", "memfile",
                            "name", "/opt/kea/var/kea-leases6.csv",
                            "lfc-interval", "3600",
                            NULL};

    string json_config = toJson(config);
    ConstElementPtr json_elements = Element::fromJSON(json_config);
    EXPECT_TRUE(json_elements);

325
326
    TestDbAccessParser parser("lease-database", DbAccessParser::LEASE_DB,
                              ParserContext(Option::V6));
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
    ASSERT_NO_THROW(parser.build(json_elements));
    checkAccessString("Valid LFC Interval", parser.getDbAccessParameters(),
                      config, Option::V6);
}

// This test checks that the parser rejects the negative value of the
// lfc-interval parameter.
TEST_F(DbAccessParserTest, negativeLFCInterval) {
    const char* config[] = {"type", "memfile",
                            "name", "/opt/kea/var/kea-leases6.csv",
                            "lfc-interval", "-1",
                            NULL};

    string json_config = toJson(config);
    ConstElementPtr json_elements = Element::fromJSON(json_config);
    EXPECT_TRUE(json_elements);

344
345
    TestDbAccessParser parser("lease-database", DbAccessParser::LEASE_DB,
                              ParserContext(Option::V6));
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
    EXPECT_THROW(parser.build(json_elements), BadValue);
}

// This test checks that the parser rejects the too large (greater than
// the max uint32_t) value of the lfc-interval parameter.
TEST_F(DbAccessParserTest, largeLFCInterval) {
    const char* config[] = {"type", "memfile",
                            "name", "/opt/kea/var/kea-leases6.csv",
                            "lfc-interval", "4294967296",
                            NULL};

    string json_config = toJson(config);
    ConstElementPtr json_elements = Element::fromJSON(json_config);
    EXPECT_TRUE(json_elements);

361
362
    TestDbAccessParser parser("lease-database", DbAccessParser::LEASE_DB,
                              ParserContext(Option::V6));
363
364
365
    EXPECT_THROW(parser.build(json_elements), BadValue);
}

366
367
// Check that the parser works with a valid MySQL configuration
TEST_F(DbAccessParserTest, validTypeMysql) {
368
369
370
371
372
373
374
375
376
377
378
    const char* config[] = {"type",     "mysql",
                            "host",     "erewhon",
                            "user",     "kea",
                            "password", "keapassword",
                            "name",     "keatest",
                            NULL};

    string json_config = toJson(config);
    ConstElementPtr json_elements = Element::fromJSON(json_config);
    EXPECT_TRUE(json_elements);

379
380
    TestDbAccessParser parser("lease-database", DbAccessParser::LEASE_DB,
                              ParserContext(Option::V4));
381
    EXPECT_NO_THROW(parser.build(json_elements));
382
    checkAccessString("Valid mysql", parser.getDbAccessParameters(), config);
383
384
}

385
386
387
388
389
390
391
392
393
394
395
396
// A missing 'type' keyword should cause an exception to be thrown.
TEST_F(DbAccessParserTest, missingTypeKeyword) {
    const char* config[] = {"host",     "erewhon",
                            "user",     "kea",
                            "password", "keapassword",
                            "name",     "keatest",
                            NULL};

    string json_config = toJson(config);
    ConstElementPtr json_elements = Element::fromJSON(json_config);
    EXPECT_TRUE(json_elements);

397
398
    TestDbAccessParser parser("lease-database", DbAccessParser::LEASE_DB,
                              ParserContext(Option::V4));
399
400
401
    EXPECT_THROW(parser.build(json_elements), TypeKeywordMissing);
}

402
403
404
405
406
// Check that the factory function works.
TEST_F(DbAccessParserTest, factory) {

    // Check that the parser is built through the factory.
    boost::scoped_ptr<DhcpConfigParser> parser(
407
408
        DbAccessParser::factory("lease-database", ParserContext(Option::V4))
    );
409
    EXPECT_TRUE(parser);
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
    DbAccessParser* dbap = dynamic_cast<DbAccessParser*>(parser.get());
    EXPECT_NE(static_cast<DbAccessParser*>(NULL), dbap);
}

// Check reconfiguration.  Checks that incremental changes applied to the
// database configuration are incremental.
TEST_F(DbAccessParserTest, incrementalChanges) {
    const char* config1[] = {"type", "memfile",
                             NULL};

    // Applying config2 will cause a wholesale change.
    const char* config2[] = {"type",     "mysql",
                             "host",     "erewhon",
                             "user",     "kea",
                             "password", "keapassword",
                             "name",     "keatest",
                             NULL};

    // Applying incremental2 should cause a change to config3.
    const char* incremental2[] = {"user",     "me",
                                  "password", "meagain",
                                  NULL};
    const char* config3[] = {"type",     "mysql",
                             "host",     "erewhon",
                             "user",     "me",
                             "password", "meagain",
                             "name",     "keatest",
                             NULL};

    // incremental3 will cause an exception.  There should be no change
    // to the returned value.
    const char* incremental3[] = {"type",     "invalid",
                                  "user",     "you",
                                  "password", "youagain",
                                  NULL};

    // incremental4 is a compatible change and should cause a transition
    // to config4.
    const char* incremental4[] = {"user",     "them",
449
                                  "password", "",
450
451
452
453
                                  NULL};
    const char* config4[] = {"type",     "mysql",
                             "host",     "erewhon",
                             "user",     "them",
454
                             "password", "",
455
456
457
                             "name",     "keatest",
                             NULL};

458
459
    TestDbAccessParser parser("lease-database", DbAccessParser::LEASE_DB,
                              ParserContext(Option::V4));
460
461
462
463
464
465
466
467

    // First configuration string should cause a representation of that string
    // to be held.
    string json_config = toJson(config1);
    ConstElementPtr json_elements = Element::fromJSON(json_config);
    EXPECT_TRUE(json_elements);

    EXPECT_NO_THROW(parser.build(json_elements));
468
469
    checkAccessString("Initial configuration", parser.getDbAccessParameters(),
                      config1);
470
471
472
473
474
475
476
477

    // Applying a wholesale change will cause the access string to change
    // to a representation of the new configuration.
    json_config = toJson(config2);
    json_elements = Element::fromJSON(json_config);
    EXPECT_TRUE(json_elements);

    EXPECT_NO_THROW(parser.build(json_elements));
478
479
    checkAccessString("Subsequent configuration", parser.getDbAccessParameters(),
                      config2);
480
481
482
483
484
485
486
487

    // Applying an incremental change will cause the representation to change
    // incrementally.
    json_config = toJson(incremental2);
    json_elements = Element::fromJSON(json_config);
    EXPECT_TRUE(json_elements);

    EXPECT_NO_THROW(parser.build(json_elements));
488
489
    checkAccessString("Incremental configuration", parser.getDbAccessParameters(),
                      config3);
490
491
492
493
494
495
496

    // Applying the next incremental change should cause an exception to be
    // thrown and there be no change to the access string.
    json_config = toJson(incremental3);
    json_elements = Element::fromJSON(json_config);
    EXPECT_TRUE(json_elements);

497
    EXPECT_THROW(parser.build(json_elements), BadValue);
498
499
    checkAccessString("Incompatible incremental change", parser.getDbAccessParameters(),
                      config3);
500
501
502
503
504
505
506
507

    // Applying an incremental change will cause the representation to change
    // incrementally.
    json_config = toJson(incremental4);
    json_elements = Element::fromJSON(json_config);
    EXPECT_TRUE(json_elements);

    EXPECT_NO_THROW(parser.build(json_elements));
508
509
    checkAccessString("Compatible incremental change", parser.getDbAccessParameters(),
                      config4);
510
511
}

512
513
514
515
516
517
518
519
520
521
522
// Check that the database access string is constructed correctly.
TEST_F(DbAccessParserTest, getDbAccessString) {
    const char* config[] = {"type",     "mysql",
                            "host",     "" ,
                            "name",     "keatest",
                            NULL};

    string json_config = toJson(config);
    ConstElementPtr json_elements = Element::fromJSON(json_config);
    EXPECT_TRUE(json_elements);

523
524
    TestDbAccessParser parser("lease-database", DbAccessParser::LEASE_DB,
                              ParserContext(Option::V4));
525
526
527
528
529
530
531
532
    EXPECT_NO_THROW(parser.build(json_elements));

    // Get the database access string
    std::string dbaccess = parser.getDbAccessString();

    // String should be either "type=mysql name=keatest" or
    // "name=keatest type=mysql". The "host" entry is null, so should not be
    // output.
533
    EXPECT_EQ(dbaccess, "name=keatest type=mysql universe=4");
534
535
}

536
537
538
539
// Check that the "commit" function actually opens the database, when type
// is set to LEASE_DB.  We will only do this for the "memfile" database, as
// that does not assume that the test has been built with MySQL support.
TEST_F(DbAccessParserTest, commitLeaseDb) {
540
541
542
543
544
545
546
547

    // Verify that no lease database is open
    EXPECT_THROW({
            LeaseMgr& manager = LeaseMgrFactory::instance();
            manager.getType();  // Never executed but satisfies compiler
            }, isc::dhcp::NoLeaseManager);

    // Set up the parser to open the memfile database.
548
    const char* config[] = {"type", "memfile", "persist", "false", NULL};
549
    string json_config = toJson(config);
550

551
552
553
    ConstElementPtr json_elements = Element::fromJSON(json_config);
    EXPECT_TRUE(json_elements);

554
555
    TestDbAccessParser parser("lease-database", DbAccessParser::LEASE_DB,
                              ParserContext(Option::V4));
556
557
558
    EXPECT_NO_THROW(parser.build(json_elements));

    // Ensure that the access string is as expected.
559
    EXPECT_EQ("persist=false type=memfile universe=4",
560
              parser.getDbAccessString());
561
562
563
564
565
566
567
568
569
570

    // Committal of the parser changes should open the database.
    EXPECT_NO_THROW(parser.commit());

    // Verify by checking the type of database open.
    std::string dbtype;
    EXPECT_NO_THROW(dbtype = LeaseMgrFactory::instance().getType());
    EXPECT_EQ(std::string("memfile"), dbtype);
}

571
#ifdef HAVE_MYSQL
572
// Check that the "commit" function actually opens the database, when type
573
574
575
// is set to HOSTS_DB. We're using MySQL here. Since the only currently supported
// host data source is the one that uses MySQL, we have no other choice, but to
// depend this test on MYSQL availability.
576
577
578
579
580
581
582
583
584
TEST_F(DbAccessParserTest, commitHostsDb) {

    // Verify that no lease database is open
    EXPECT_THROW({
            LeaseMgr& manager = LeaseMgrFactory::instance();
            manager.getType();  // Never executed but satisfies compiler
            }, isc::dhcp::NoLeaseManager);

    // Set up the parser to open the memfile database.
585
586
    const char* config[] = {"type", "mysql", "user", "keatest",
                            "password", "keatest", "name", "keatest", NULL};
587
588
589
590
591
592
593
594
595
596
    string json_config = toJson(config);

    ConstElementPtr json_elements = Element::fromJSON(json_config);
    EXPECT_TRUE(json_elements);

    TestDbAccessParser parser("hosts-database", DbAccessParser::HOSTS_DB,
                              ParserContext(Option::V4));
    EXPECT_NO_THROW(parser.build(json_elements));

    // Ensure that the access string is as expected.
597
    EXPECT_EQ("name=keatest password=keatest type=mysql universe=4 user=keatest",
598
599
600
601
602
              parser.getDbAccessString());

    // Destroy lease mgr (if there's any)
    LeaseMgrFactory::destroy();

603
604
    EXPECT_NO_THROW(createMySQLSchema());

605
606
607
608
    // Committal of the parser changes should not create LeaseMgr.
    // It should create HostDataSource instead.
    EXPECT_NO_THROW(parser.commit());

609
    // Check that LeaseMgr was NOT created (it shouldn't, this is for HOSTS_DB).
610
611
    EXPECT_THROW(LeaseMgrFactory::instance(), NoLeaseManager);

612
    // Verify that HostDataSource has been created.
613
    HostDataSourcePtr hds = HostMgr::instance().getHostDataSource();
614
615
616
    ASSERT_TRUE(hds);

    EXPECT_EQ("mysql", hds->getType());
617

618
    EXPECT_NO_THROW(destroyMySQLSchema());
619
}
620
#endif
621

622
};  // Anonymous namespace