4
0

txt-records.toml 2.7 KB

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