use of com.sequenceiq.cloudbreak.api.endpoint.v1.RecipeEndpoint in project cloudbreak by hortonworks.
the class RecipeCreationTest method createRecipe.
private void createRecipe(String name, String script, RecipeType recipeType, String description) {
RecipeRequest recipeRequest = new RecipeRequest();
recipeRequest.setRecipeType(recipeType);
recipeRequest.setName(name);
recipeRequest.setContent(Base64.encodeBase64String(script.getBytes()));
recipeRequest.setDescription(description);
RecipeEndpoint recipeEndpoint = getCloudbreakClient().recipeEndpoint();
Long id = recipeEndpoint.postPrivate(recipeRequest).getId();
// then
Assert.assertNotNull(id, "Recipe is not created.");
addRecipeToContext(id);
}
Aggregations