naptr-records.toml 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. # NAPTR record successes
  2. [[cmd]]
  3. name = "Running with ‘naptr.example’ prints the correct NAPTR record"
  4. shell = "dog --colour=always ${MADNS_ARGS:[email protected]:5301 --tcp} NAPTR naptr.example"
  5. stdout = { file = "outputs/naptr.example.ansitxt" }
  6. stderr = { empty = true }
  7. status = 0
  8. tags = [ "naptr", "madns" ]
  9. [[cmd]]
  10. name = "Running with ‘bad-regex.naptr.example’ still prints the correct NAPTR record"
  11. shell = "dog --colour=always ${MADNS_ARGS:[email protected]:5301 --tcp} NAPTR bad-regex.naptr.example"
  12. stdout = { file = "outputs/bad-regex.naptr.example.ansitxt" }
  13. stderr = { empty = true }
  14. status = 0
  15. tags = [ "naptr", "madns" ]
  16. [[cmd]]
  17. name = "Running with ‘utf8.naptr.example’ escapes characters in the NAPTR"
  18. shell = "dog --colour=always ${MADNS_ARGS:[email protected]:5301 --tcp} NAPTR utf8.naptr.invalid"
  19. stdout = { file = "outputs/utf8.naptr.invalid.ansitxt" }
  20. stderr = { empty = true }
  21. status = 0
  22. tags = [ "naptr", "madns", "chars" ]
  23. [[cmd]]
  24. name = "Running with ‘bad-utf8.naptr.example’ escapes characters in the NAPTR and does not crash"
  25. shell = "dog --colour=always ${MADNS_ARGS:[email protected]:5301 --tcp} NAPTR bad-utf8.naptr.invalid"
  26. stdout = { file = "outputs/bad-utf8.naptr.invalid.ansitxt" }
  27. stderr = { empty = true }
  28. status = 0
  29. tags = [ "naptr", "madns", "chars" ]
  30. # NAPTR record successes (JSON)
  31. [[cmd]]
  32. name = "Running with ‘naptr.example --json’ prints the correct NAPTR record structure"
  33. shell = "dog --colour=always ${MADNS_ARGS:[email protected]:5301 --tcp} NAPTR naptr.example --json | jq"
  34. stdout = { file = "outputs/naptr.example.json" }
  35. stderr = { empty = true }
  36. status = 0
  37. tags = [ "naptr", "madns", "json" ]
  38. [[cmd]]
  39. name = "Running with ‘utf8.naptr.example --json’ interprets the response as UTF-8"
  40. shell = "dog --colour=always ${MADNS_ARGS:[email protected]:5301 --tcp} NAPTR utf8.naptr.invalid --json | jq"
  41. stdout = { file = "outputs/utf8.naptr.invalid.json" }
  42. stderr = { empty = true }
  43. status = 0
  44. tags = [ "naptr", "madns", "chars", "json" ]
  45. [[cmd]]
  46. name = "Running with ‘bad-utf8.naptr.example --json’ uses UTF-8 replacement characters"
  47. shell = "dog --colour=always ${MADNS_ARGS:[email protected]:5301 --tcp} NAPTR bad-utf8.naptr.invalid --json | jq"
  48. stdout = { file = "outputs/bad-utf8.naptr.invalid.json" }
  49. stderr = { empty = true }
  50. status = 0
  51. tags = [ "naptr", "madns", "chars", "json" ]
  52. # NAPTR record invalid packets
  53. [[cmd]]
  54. name = "Running with ‘empty.naptr.invalid’ displays a protocol error"
  55. shell = "dog --colour=always ${MADNS_ARGS:[email protected]:5301 --tcp} NAPTR empty.naptr.invalid"
  56. stdout = { empty = true }
  57. stderr = { string = "Error [protocol]: Malformed packet: insufficient data" }
  58. status = 1
  59. tags = [ "naptr", "madns" ]
  60. [[cmd]]
  61. name = "Running with ‘incomplete.naptr.invalid’ displays a protocol error"
  62. shell = "dog --colour=always ${MADNS_ARGS:[email protected]:5301 --tcp} NAPTR incomplete.naptr.invalid"
  63. stdout = { empty = true }
  64. stderr = { string = "Error [protocol]: Malformed packet: insufficient data" }
  65. status = 1
  66. tags = [ "naptr", "madns" ]