assertEquals(statementList.size(), 5);
assertEquals(statementList.get(0), exec("{md} /tmp/databags"));
assertEquals(statementList.get(1), exec("{md} /tmp/databags/" + databagFoo.getName()));
assertEquals(statementList.get(2).render(OsFamily.UNIX), expectedFoo.render(OsFamily.UNIX));
assertEquals(statementList.get(3), exec("{md} /tmp/databags/" + databagBar.getName()));
assertEquals(statementList.get(4).render(OsFamily.UNIX), expectedBar.render(OsFamily.UNIX));
}
public void testCreateDatabagsIfNecessaryWithMultipleDatabagsAndMultipleItemsAndCustomPath() {
ImmutableList.Builder<Statement> statements = ImmutableList.builder();
DataBag databagFoo = DataBag.builder().name("foo").item("itemFoo", "{\"foo\":\"bar\"}").build();