Statement expected = createOrOverwriteFile("/tmp/databags/foo/item.json", ImmutableSet.of("{\"foo\":\"bar\"}"));
assertEquals(statementList.size(), 3);
assertEquals(statementList.get(0), exec("{md} /tmp/databags"));
assertEquals(statementList.get(1), exec("{md} /tmp/databags/" + databag.getName()));
assertEquals(statementList.get(2).render(OsFamily.UNIX), expected.render(OsFamily.UNIX));
}
public void testCreateDatabagsIfNecessaryWithOneDatabagWithMultipleItemsAndCustomPath() {
ImmutableList.Builder<Statement> statements = ImmutableList.builder();
DataBag databag = DataBag.builder().name("foo").item("item1", "{\"foo\":\"bar\"}")