File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
src/test/java/hudson/plugins/powershell Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -76,6 +76,21 @@ public void testBuildBadCommandsSucceeds() throws Exception {
76
76
r .assertBuildStatus (Result .SUCCESS , build );
77
77
}
78
78
79
+ @ Test
80
+ public void testBuildAndDisableProject () throws Exception {
81
+ Assume .assumeTrue (isPowerShellAvailable ());
82
+
83
+ FreeStyleProject project1 = r .createFreeStyleProject ("project1" );
84
+ project1 .getBuildersList ().add (new PowerShell ("echo 'Hello World!'" , true , true ));
85
+
86
+ QueueTaskFuture <FreeStyleBuild > freeStyleBuildQueueTaskFuture = project1 .scheduleBuild2 (0 );
87
+ FreeStyleBuild build = freeStyleBuildQueueTaskFuture .get ();
88
+
89
+ r .assertBuildStatusSuccess (build );
90
+
91
+ project1 .disable ();
92
+ }
93
+
79
94
private boolean isPowerShellAvailable () {
80
95
return Stream .of (System .getenv ("PATH" ).split (Pattern .quote (File .pathSeparator )))
81
96
.map (Paths ::get )
You can’t perform that action at this time.
0 commit comments