[ { "title": "gen ident", "cmd": [ "genident", "name=A Test User" ] }, { "special": "set hostid", "comment": "and that a modified hostid", "hostid": "ceaa4862-dd00-41ba-9787-7480ec1b2679" }, { "title": "that hosts lists itself", "cmd": [ "hosts" ], "stdout_re": ".*\tceaa4862-dd00-41ba-9787-7480ec1b2679\n" }, { "special": "verify store object cnt", "comment": "and that the host object was created", "count": 1 }, { "special": "set hostid", "comment": "and that a different hostid", "hostid": "efdb5d9c-d123-4b30-aaa8-45a9ea8f6053" }, { "title": "that hosts lists itself first", "cmd": [ "hosts" ], "stdout_re": ".*\tefdb5d9c-d123-4b30-aaa8-45a9ea8f6053\n.*\tceaa4862-dd00-41ba-9787-7480ec1b2679\n" }, { "special": "verify store object cnt", "comment": "and that the host object was created", "count": 2 }, { "title": "that a mapping with unknown host errors", "cmd": [ "mapping", "--create", "ceaa4862-dd00-41ba-9787-7480ec1b267a:/foo", "efdb5d9c-d123-4b30-aaa8-45a9ea8f6053:/bar" ], "exit": 1, "stderr": "ERROR: Unable to find host ceaa4862-dd00-41ba-9787-7480ec1b267a\n" }, { "title": "that a host mapping that isn't absolute errors", "cmd": [ "mapping", "--create", ".", "efdb5d9c-d123-4b30-aaa8-45a9ea8f6053:." ], "stderr": "ERROR: host path must be absolute, is '.'.\n", "exit": 1 }, { "special": "setup mapping paths" }, { "title": "that a host mapping works", "cmd": [ "mapping", "--create", "mapa", "ceaa4862-dd00-41ba-9787-7480ec1b2679:{mappathb}" ], "format": [ "cmd" ] }, { "special": "verify store object cnt", "comment": "and that the host object was created", "count": 3 }, { "title": "that it was created w/ correct values", "cmd": [ "dump" ], "format": [ "stdout_re" ], "stdout_re": ".*\n.*\n.*mapping.*efdb5d9c-d123-4b30-aaa8-45a9ea8f6053:{mappatha}.*ceaa4862-dd00-41ba-9787-7480ec1b2679:{mappathb}.*type.*mapping.*\n" }, { "title": "that a file on one mapping can have metadata", "cmd": [ "modify", "+sometag=value", "mapa/text.txt" ] }, { "special": "verify store object cnt", "comment": "and that the file and metadata was created", "count": 5 }, { "special": "set hostid", "comment": "that the other host", "hostid": "ceaa4862-dd00-41ba-9787-7480ec1b2679" }, { "special": "delete files", "comment": "remove the other host's file, to verify it works", "format": [ "files" ], "files": [ "{mappatha}/text.txt" ] }, { "title": "can see the other host's metadata", "cmd": [ "list", "mapb/text.txt" ], "stdout_re": ".*\n.*\nsometag:\tvalue\n" }, { "title": "and add it's own value", "cmd": [ "modify", "+sometag=anothervalue", "mapb/text.txt" ] }, { "special": "verify store object cnt", "comment": "but didn't create an additional FileObject", "count": 5 } ]