• Thomas Markwalder's avatar
    [4239] MySQL and Postgresql unit tests use production schema create scripts · b45da895
    Thomas Markwalder authored
    src/lib/dhcpsrv/testutils/schema.h
    src/lib/dhcpsrv/testutils/schema.cc
        New files that contain constants and functions common to RDBMS
        testing
    
    src/lib/dhcpsrv/testutils/pgsql_schema.h
    src/lib/dhcpsrv/testutils/pgsql_schema.cc
        New files that contain constants and functions needed for
        Posgresql testing
    
    src/lib/dhcpsrv/testutils/mysql_schema.cc
    src/lib/dhcpsrv/testutils/mysql_schema.h
        Removed common constants and functions
        Added MYSQL_VALID_TYPE
        runMySQLScript() - new function to submit a script to MySQL
    
    src/lib/dhcpsrv/pgsql_lease_mgr.cc
        PgSqlLease6Exchange - replaced uint32_t iaid member with Uiaid union
        instance.  This permits the value to be safely stored in the database
        as an INT (signed 4-byte value)
        getColumnValue()- added int32_t variant of this method
    
    src/lib/dhcpsrv/tests/Makefile.am
        Removed schema_pgsql_copy.h
    
    src/lib/dhcpsrv/tests/mysql_host_data_source_unittest.cc
    src/lib/dhcpsrv/tests/mysql_lease_mgr_unittest.cc
        Altered tests to use MYSQL_VALID_TYPE
    
    src/lib/dhcpsrv/tests/pgsql_lease_mgr_unittest.cc
        Moved constants and functions testutils/pgsl_schema.h & cc
    b45da895
Makefile.am 8.04 KB