static Stream getSolutions()

in javatests/com/google/cloud/deploymentmanager/autogen/AutogenMediumTestsSuite.java [86:109]


    static Stream<Solution> getSolutions(File inputSpecFile) {
      File solutionFolder = inputSpecFile.getParentFile();
      File dmGoldenFolder = new File(solutionFolder, "dm");
      File terraformGoldenFolder = new File(solutionFolder, "tf");
      if (!dmGoldenFolder.exists() && !terraformGoldenFolder.exists()) {
        throw new IllegalStateException(
            "No golden folder exists for either Deployment Manager or Terraform");
      }

      List<Solution> solutions = new ArrayList<>();
      if (dmGoldenFolder.exists()) {
        solutions.add(
            new Solution(
                inputSpecFile, solutionFolder, dmGoldenFolder, DeploymentTool.DEPLOYMENT_MANAGER));
      }

      if (terraformGoldenFolder.exists()) {
        solutions.add(
            new Solution(
                inputSpecFile, solutionFolder, terraformGoldenFolder, DeploymentTool.TERRAFORM));
      }

      return solutions.stream();
    }