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.
 
 
 
 

108 lines
3.0 KiB

  1. [
  2. {
  3. "title": "gen ident",
  4. "cmd": [ "genident", "name=A Test User" ]
  5. },
  6. {
  7. "special": "set hostid",
  8. "comment": "and that a modified hostid",
  9. "hostid": "ceaa4862-dd00-41ba-9787-7480ec1b2679"
  10. },
  11. {
  12. "title": "that hosts lists itself",
  13. "cmd": [ "hosts" ],
  14. "stdout_re": ".*\tceaa4862-dd00-41ba-9787-7480ec1b2679\n",
  15. "stdout_nre": ".*\tceaa4862-dd00-41ba-9787-7480ec1b2679\n.*\tceaa4862-dd00-41ba-9787-7480ec1b2679\n"
  16. },
  17. {
  18. "special": "verify store object cnt",
  19. "comment": "and that the host object was created",
  20. "count": 1
  21. },
  22. {
  23. "special": "set hostid",
  24. "comment": "and that a different hostid",
  25. "hostid": "efdb5d9c-d123-4b30-aaa8-45a9ea8f6053"
  26. },
  27. {
  28. "title": "that hosts lists itself first",
  29. "cmd": [ "hosts" ],
  30. "stdout_re": ".*\tefdb5d9c-d123-4b30-aaa8-45a9ea8f6053\n.*\tceaa4862-dd00-41ba-9787-7480ec1b2679\n"
  31. },
  32. {
  33. "special": "verify store object cnt",
  34. "comment": "and that the host object was created",
  35. "count": 2
  36. },
  37. {
  38. "title": "that a mapping with unknown host errors",
  39. "cmd": [ "mapping", "--create", "ceaa4862-dd00-41ba-9787-7480ec1b267a:/foo", "efdb5d9c-d123-4b30-aaa8-45a9ea8f6053:/bar" ],
  40. "exit": 1,
  41. "stderr": "ERROR: Unable to find host ceaa4862-dd00-41ba-9787-7480ec1b267a\n"
  42. },
  43. {
  44. "title": "that a host mapping that isn't absolute errors",
  45. "cmd": [ "mapping", "--create", ".", "efdb5d9c-d123-4b30-aaa8-45a9ea8f6053:." ],
  46. "stderr": "ERROR: host path must be absolute, is '.'.\n",
  47. "exit": 1
  48. },
  49. {
  50. "special": "setup mapping paths"
  51. },
  52. {
  53. "title": "that a host mapping works",
  54. "cmd": [ "mapping", "--create", "mapa", "ceaa4862-dd00-41ba-9787-7480ec1b2679:{mappathb}" ],
  55. "format": [ "cmd" ]
  56. },
  57. {
  58. "special": "verify store object cnt",
  59. "comment": "and that the host object was created",
  60. "count": 3
  61. },
  62. {
  63. "title": "that it was created w/ correct values",
  64. "cmd": [ "dump" ],
  65. "format": [ "stdout_re" ],
  66. "stdout_re": ".*\n.*\n.*mapping.*efdb5d9c-d123-4b30-aaa8-45a9ea8f6053:{mappatha}.*ceaa4862-dd00-41ba-9787-7480ec1b2679:{mappathb}.*type.*mapping.*\n"
  67. },
  68. {
  69. "title": "that a file on one mapping can have metadata",
  70. "cmd": [ "modify", "+sometag=value", "mapa/text.txt" ]
  71. },
  72. {
  73. "special": "verify store object cnt",
  74. "comment": "and that the file and metadata was created",
  75. "count": 5
  76. },
  77. {
  78. "special": "set hostid",
  79. "comment": "that the other host",
  80. "hostid": "ceaa4862-dd00-41ba-9787-7480ec1b2679"
  81. },
  82. {
  83. "special": "delete files",
  84. "comment": "remove the other host's file, to verify it works",
  85. "format": [ "files" ],
  86. "files": [ "{mappatha}/text.txt" ]
  87. },
  88. {
  89. "title": "can see the other host's metadata",
  90. "cmd": [ "list", "mapb/text.txt" ],
  91. "stdout_re": ".*\n.*\nsometag:\tvalue\n"
  92. },
  93. {
  94. "title": "and add it's own value",
  95. "cmd": [ "modify", "+sometag=anothervalue", "mapb/text.txt" ]
  96. },
  97. {
  98. "special": "verify store object cnt",
  99. "comment": "but didn't create an additional FileObject",
  100. "count": 5
  101. },
  102. {
  103. "title": "just mapping lists them",
  104. "cmd": [ "mapping" ],
  105. "stdout_re": "^efdb5d9c-d123-4b30-aaa8-45a9ea8f6053:/.*subdir/mapa <-> ceaa4862-dd00-41ba-9787-7480ec1b2679:/.*subdir/mapb\n$"
  106. }
  107. ]