Opened 10 years ago

Closed 9 years ago

#174 closed task (fixed)

Loadzone: Make a collection of zone files to test loadzone

Reported by: zhanglikun Owned by: jreed
Priority: medium Milestone: 05. 3rd Incremental Release: Serious Secondary
Component: loadzone Version:
Keywords: Cc:
CVSS Scoring: Parent Tickets:
Sensitive: no Defect Severity:
Sub-Project: Feature Depending on Ticket:
Estimated Difficulty: Add Hours to Ticket:
Total Hours: Internal?:

Description

Create ticket for task 88. The following part is the concreate description of task 88 provided by Jeremy in one email.

task 88: loadzone test suite of different file formats to load

Question: Does it mean to design different types of zone files in
correct or wrong format, to test loadzone?

It is worded wrong. It is not about different file formats to load, but about loading different RFC1035 master file format zone files. Some containing correct zones and some containing deliberate errors (like impossible TTLs or bogus RDATA of wrong format, et cetera).

I believe the goal is to make a collection of many zone files and a way to use them for testing.

BIND 9 source contains many zone files. I think they are all named "*.db" under bin/tests/. Maybe these can give some ideas and maybe some or all can be re-used. You can also collect and create your own zone data. Consider to document somewhere (maybe the files themselves) what they contain and expected behaviour.

Also need some way to test using those master files. I think Cucumber will be used in the long run. But for now, maybe some simple shell or python scripts to load the files and check the results: verbose output (see task 89), store and compare sqlite text dumps, or maybe even real queries.

Subtickets

Change History (8)

comment:1 Changed 10 years ago by jreed

tingting-loadzone as of revision 1901 is a great start.
A few suggestions:

  • I am not sure if all versions of dig will give the same output (maybe formatted different in some case).
  • Assumes server is running. Could also use a tool like sqlite to export data from the db and use that to compare.
  • use @builddir@/src/bin/loadzone/b10-loadzone instead of just b10-loadzone in path.
  • use the b10-loadzone -d to choose an testing sqlite db file. Remove the db file before each use unless you expect to test using a pre-existing db file.
  • use separate expected output files for each zone file tested that way failures can be identified easier/quicker for a specific failure
  • don't include the generated file in svn (that will be overwritten) like error.out.
  • also integrate with make check -- I will think of way to do this cleanly and correctly.

Thanks for your work on this! It is useful.

I am sure others, including myself, will add more tests to this.

Also maybe later cucumber will be used. Or at least cucumber could be trained to use the same test data.

comment:2 Changed 9 years ago by zhanglikun

  • Owner changed from zhanglikun to shentingting
  • Status changed from new to assigned

Reassign to Tingting, make sure she can get the email.

comment:3 Changed 9 years ago by shane

  • Milestone changed from 04. 2nd Incremental Release: Early Adopters to 05. 3rd Incremental Release

comment:4 Changed 9 years ago by shentingting

The code has been committed in r2340 in trunk, please check.

comment:5 Changed 9 years ago by jreed

  • Owner changed from shentingting to jreed
  • Status changed from assigned to reviewing

comment:6 Changed 9 years ago by shane

Did this go into the last release?

comment:7 Changed 9 years ago by zhanglikun

Yes, it has been included in the latest release, so close this one.

comment:8 Changed 9 years ago by shane

  • Resolution set to fixed
  • Status changed from reviewing to closed
Note: See TracTickets for help on using tickets.