Opened 7 years ago

Closed 7 years ago

#2909 closed defect (fixed)

Update schema_copy.h in line with schema creation script

Reported by: stephen Owned by: stephen
Priority: medium Milestone: Sprint-DHCP-20130523
Component: database-all Version:
Keywords: Cc:
CVSS Scoring: Parent Tickets:
Sensitive: no Defect Severity: N/A
Sub-Project: DHCP Feature Depending on Ticket:
Estimated Difficulty: 0 Add Hours to Ticket: 0
Total Hours: 0 Internal?: no

Description

The file src/lib/dhcpsrv/tests/schema_copy.h contains a set of statements to destroy the test database and to recreate it before each test. The creation statements should be a duplicate of the schema creation statements in src/lib/dhcpsrv/dhcpdb_create.mysql.

schema_copy.h needs to be updated to include the index statements added to dhcpdb_create.mysql.

Subtickets

Change History (7)

comment:1 Changed 7 years ago by stephen

  • Milestone changed from DHCP Outstanding Tasks to Sprint-DHCP-20130509

comment:2 Changed 7 years ago by stephen

  • Owner set to stephen
  • Status changed from new to accepted

comment:3 Changed 7 years ago by stephen

  • Owner changed from stephen to UnAssigned
  • Status changed from accepted to reviewing

comment:4 Changed 7 years ago by tmark

  • Owner changed from UnAssigned to tmark

comment:5 Changed 7 years ago by tmark

  • Owner changed from tmark to stephen

Changes verified, unit tests pass. Please merge the changes.

It would be good to find a way for the unit tests to utilize the production code, to create and destroy the database. This would make the unit tests verify the production code and eliminate having to keep both up to date.

comment:6 Changed 7 years ago by stephen

  • Milestone changed from Sprint-DHCP-20130509 to Sprint-DHCP-20130523

comment:7 Changed 7 years ago by stephen

  • Resolution set to fixed
  • Status changed from reviewing to closed

Merged in commit 69cdc5f74d067196ec35daad43f842f716897bcc

It would be good to find a way for the unit tests to utilize the production code, to create and destroy the database. This would make the unit tests verify the production code and eliminate having to keep both up to date.

I agree, but that would require admin access to MySQL. The current method - where the database is not touched, only the schema - keeps privilege to a minimum.

Note: See TracTickets for help on using tickets.