@Test @Category(org.eclipse.steady.shared.categories.Slow.class) public void testPyAppGoal() throws GoalConfigurationException, GoalExecutionException { System.setProperty(CoreConfiguration.APP_DIRS, "./src/test/resources/cf-helloworld"); this.configureBackendServiceUrl(server); this.setupMockServices(this.testApp); final String[] args = new String[] {"-goal", "app"}; VulasCli.main(args); verifyHttp(server) .times(1, method(Method.PUT), uri("/backend" + PathBuilder.app(this.testApp))); verifyHttp(server) .times( 2, method(Method.POST), uri("/backend" + PathBuilder.goalExcecutions(null, null, this.testApp))); }
public static void main(String[] _args) throws GoalConfigurationException, GoalExecutionException { final Options options = new Options(); options.addOption( "goal", "goal", true, "Goal to be executed (clean, cleanSpace, app, a2c, t2c, instr, report, upload)"); try { final CommandLineParser parser = new DefaultParser(); final CommandLine cmd = parser.parse(options, _args); String g = cmd.getOptionValue("goal", null); if ("cleanSpace".equals(g)) g = "spaceClean"; else if ("cleanSpace".equals(g)) g = "spaceDel"; goalType = GoalType.parseGoal(g); } catch (ParseException pe) { log.error(pe.getMessage()); final HelpFormatter formatter = new HelpFormatter(); formatter.printHelp("Vulas Command Line Interface", options); return; } catch (IllegalArgumentException iae) { log.error(iae.getMessage()); final HelpFormatter formatter = new HelpFormatter(); formatter.printHelp("Vulas Command Line Interface", options); return; } try { goal = GoalFactory.create(goalType, GoalClient.CLI); goal.executeSync(); } catch (IllegalStateException ise) { log.error(ise.getMessage()); } catch (IllegalArgumentException iae) { log.error(iae.getMessage()); } }
VulasCli { public static void main(String[] _args) throws GoalConfigurationException, GoalExecutionException { final Options options = new Options(); options.addOption( "goal", "goal", true, "Goal to be executed (clean, cleanSpace, app, a2c, t2c, instr, report, upload)"); try { final CommandLineParser parser = new DefaultParser(); final CommandLine cmd = parser.parse(options, _args); String g = cmd.getOptionValue("goal", null); if ("cleanSpace".equals(g)) g = "spaceClean"; else if ("cleanSpace".equals(g)) g = "spaceDel"; goalType = GoalType.parseGoal(g); } catch (ParseException pe) { log.error(pe.getMessage()); final HelpFormatter formatter = new HelpFormatter(); formatter.printHelp("Vulas Command Line Interface", options); return; } catch (IllegalArgumentException iae) { log.error(iae.getMessage()); final HelpFormatter formatter = new HelpFormatter(); formatter.printHelp("Vulas Command Line Interface", options); return; } try { goal = GoalFactory.create(goalType, GoalClient.CLI); goal.executeSync(); } catch (IllegalStateException ise) { log.error(ise.getMessage()); } catch (IllegalArgumentException iae) { log.error(iae.getMessage()); } } }
VulasCli { public static void main(String[] _args) throws GoalConfigurationException, GoalExecutionException { final Options options = new Options(); options.addOption( "goal", "goal", true, "Goal to be executed (clean, cleanSpace, app, a2c, t2c, instr, report, upload)"); try { final CommandLineParser parser = new DefaultParser(); final CommandLine cmd = parser.parse(options, _args); String g = cmd.getOptionValue("goal", null); if ("cleanSpace".equals(g)) g = "spaceClean"; else if ("cleanSpace".equals(g)) g = "spaceDel"; goalType = GoalType.parseGoal(g); } catch (ParseException pe) { log.error(pe.getMessage()); final HelpFormatter formatter = new HelpFormatter(); formatter.printHelp("Vulas Command Line Interface", options); return; } catch (IllegalArgumentException iae) { log.error(iae.getMessage()); final HelpFormatter formatter = new HelpFormatter(); formatter.printHelp("Vulas Command Line Interface", options); return; } try { goal = GoalFactory.create(goalType, GoalClient.CLI); goal.executeSync(); } catch (IllegalStateException ise) { log.error(ise.getMessage()); } catch (IllegalArgumentException iae) { log.error(iae.getMessage()); } }  }
VulasCli { public static void main(String[] _args) throws GoalConfigurationException, GoalExecutionException { final Options options = new Options(); options.addOption( "goal", "goal", true, "Goal to be executed (clean, cleanSpace, app, a2c, t2c, instr, report, upload)"); try { final CommandLineParser parser = new DefaultParser(); final CommandLine cmd = parser.parse(options, _args); String g = cmd.getOptionValue("goal", null); if ("cleanSpace".equals(g)) g = "spaceClean"; else if ("cleanSpace".equals(g)) g = "spaceDel"; goalType = GoalType.parseGoal(g); } catch (ParseException pe) { log.error(pe.getMessage()); final HelpFormatter formatter = new HelpFormatter(); formatter.printHelp("Vulas Command Line Interface", options); return; } catch (IllegalArgumentException iae) { log.error(iae.getMessage()); final HelpFormatter formatter = new HelpFormatter(); formatter.printHelp("Vulas Command Line Interface", options); return; } try { goal = GoalFactory.create(goalType, GoalClient.CLI); goal.executeSync(); } catch (IllegalStateException ise) { log.error(ise.getMessage()); } catch (IllegalArgumentException iae) { log.error(iae.getMessage()); } }  static void main(String[] _args); }
VulasCli { public static void main(String[] _args) throws GoalConfigurationException, GoalExecutionException { final Options options = new Options(); options.addOption( "goal", "goal", true, "Goal to be executed (clean, cleanSpace, app, a2c, t2c, instr, report, upload)"); try { final CommandLineParser parser = new DefaultParser(); final CommandLine cmd = parser.parse(options, _args); String g = cmd.getOptionValue("goal", null); if ("cleanSpace".equals(g)) g = "spaceClean"; else if ("cleanSpace".equals(g)) g = "spaceDel"; goalType = GoalType.parseGoal(g); } catch (ParseException pe) { log.error(pe.getMessage()); final HelpFormatter formatter = new HelpFormatter(); formatter.printHelp("Vulas Command Line Interface", options); return; } catch (IllegalArgumentException iae) { log.error(iae.getMessage()); final HelpFormatter formatter = new HelpFormatter(); formatter.printHelp("Vulas Command Line Interface", options); return; } try { goal = GoalFactory.create(goalType, GoalClient.CLI); goal.executeSync(); } catch (IllegalStateException ise) { log.error(ise.getMessage()); } catch (IllegalArgumentException iae) { log.error(iae.getMessage()); } }  static void main(String[] _args);  }