use of hudson.model.PasswordParameterDefinition in project workflow-cps-plugin by jenkinsci.
the class ParamsVariableTest method smokes.
@Issue("JENKINS-27295")
@Test
public void smokes() throws Exception {
WorkflowJob p = r.jenkins.createProject(WorkflowJob.class, "p");
p.setDefinition(new CpsFlowDefinition("echo(/TEXT=${params.TEXT} FLAG=${params.FLAG ? 'yes' : 'no'} PASS=${params.PASS}/)", true));
p.addProperty(new ParametersDefinitionProperty(new StringParameterDefinition("TEXT", ""), new BooleanParameterDefinition("FLAG", false, null), new PasswordParameterDefinition("PASS", "", null)));
WorkflowRun b = r.assertBuildStatusSuccess(p.scheduleBuild2(0, new ParametersAction(new StringParameterValue("TEXT", "hello"), new BooleanParameterValue("FLAG", true), new PasswordParameterValue("PASS", "s3cr3t"))));
r.assertLogContains("TEXT=hello", b);
r.assertLogContains("FLAG=yes", b);
r.assertLogContains("PASS=s3cr3t", b);
}
Aggregations