TeStereo report
@Test public void testClusterSpecExports() throws Exception {
PropertiesConfiguration conf=new PropertiesConfiguration();
conf.addProperty("ignored","ignored_value");
conf.addProperty("whirr.env.FOO_BAR","my_value");
ClusterSpec clusterSpec=ClusterSpec.withTemporaryKeys(conf);
clusterSpec.setClusterName("test-cluster");
clusterSpec.setProvider("test-provider");
StatementBuilder builder=new StatementBuilder();
builder.addStatement(Statements.exec("echo $FOO_BAR"));
String script=builder.name("foo").build(clusterSpec).render(OsFamily.UNIX);
assertThat(script,containsString("export FOO_BAR="));
assertThat(script,containsString("my_value"));
assertThat(script,containsString("echo $FOO_BAR"));
assertThat(script,not(containsString("ignored")));
}