MetaData Sharing
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

83 lines
1.7 KiB

  1. [
  2. {
  3. "title": "gen ident",
  4. "cmd": [ "genident", "name=A Test User" ],
  5. "exit": 0
  6. },
  7. {
  8. "special": "set hostid",
  9. "hostid": "ceaa4862-dd00-41ba-9787-7480ec1b2679"
  10. },
  11. {
  12. "title": "create host",
  13. "cmd": [ "hosts" ]
  14. },
  15. {
  16. "special": "set hostid",
  17. "hostid": "efdb5d9c-d123-4b30-aaa8-45a9ea8f6053"
  18. },
  19. {
  20. "title": "create host",
  21. "cmd": [ "hosts" ]
  22. },
  23. {
  24. "title": "add tag a",
  25. "cmd": [ "modify", "+tag=foo", "+dc:creator=John-Mark Gurney", "newfile.txt" ]
  26. },
  27. {
  28. "title": "add tag b",
  29. "cmd": [ "modify", "+tag=bar", "+dc:creator=John-Mark Gurney", "+other=baz", "test.txt" ]
  30. },
  31. {
  32. "special": "verify store object cnt",
  33. "comment": "should have two file and two metadata and two hosts",
  34. "count": 6
  35. },
  36. {
  37. "title": "search tag foo",
  38. "cmd": [ "search", "file", "+tag=foo" ],
  39. "stdout_re": "/newfile.txt\n$"
  40. },
  41. {
  42. "title": "search tag bar",
  43. "cmd": [ "search", "file", "+tag=bar" ],
  44. "stdout_re": "/test.txt\n$"
  45. },
  46. {
  47. "title": "search no tag bar",
  48. "cmd": [ "search", "file", "-tag=bar" ],
  49. "stdout_re": "/newfile.txt\n$"
  50. },
  51. {
  52. "title": "search no other",
  53. "cmd": [ "search", "file", "-other" ],
  54. "stdout_re": "/newfile.txt\n$"
  55. },
  56. {
  57. "special": "set hostid",
  58. "hostid": "ceaa4862-dd00-41ba-9787-7480ec1b2679"
  59. },
  60. {
  61. "title": "test that no mapping works",
  62. "cmd": [ "search", "file", "+other" ],
  63. "stdout_re": "^efdb5d9c-d123-4b30-aaa8-45a9ea8f6053:/.*/test.txt\n$"
  64. },
  65. {
  66. "special": "set hostid",
  67. "hostid": "efdb5d9c-d123-4b30-aaa8-45a9ea8f6053"
  68. },
  69. {
  70. "title": "host mapping works",
  71. "cmd": [ "mapping", "--create", ".", "ceaa4862-dd00-41ba-9787-7480ec1b2679:/foobar" ]
  72. },
  73. {
  74. "special": "set hostid",
  75. "hostid": "ceaa4862-dd00-41ba-9787-7480ec1b2679"
  76. },
  77. {
  78. "title": "search other, mapped properly",
  79. "cmd": [ "search", "file", "+other" ],
  80. "stdout_re": "^/foobar/test.txt\n$"
  81. }
  82. ]