Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use Assume rather than checking null to avoid PCT failure #146

Merged
merged 1 commit into from
Sep 16, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import com.google.common.collect.ArrayListMultimap;
import hudson.EnvVars;
import hudson.Launcher;
import hudson.Plugin;
import hudson.model.*;
import hudson.model.Cause.UserIdCause;
import hudson.model.Cause.UpstreamCause;
Expand All @@ -39,6 +40,7 @@
import hudson.plugins.promoted_builds.conditions.DownstreamPassCondition;
import org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition;
import org.jenkinsci.plugins.workflow.job.WorkflowJob;
import org.junit.Assume;
import org.junit.Rule;
import org.junit.Test;

Expand Down Expand Up @@ -400,7 +402,8 @@ public void testBlockingTriggerWithMatrixProject() throws Exception {
@Issue("JENKINS-17751")
@Test
public void testTriggerFromPromotion() throws Exception {
assertNotNull("promoted-builds must be installed.", Jenkins.getInstance().getPlugin("promoted-builds"));
Plugin plugin = Jenkins.get().getPlugin( "promoted-builds");
Assume.assumeTrue(plugin!=null);
// Test combination with PromotedBuilds.
// Assert that the original build can be tracked from triggered build.
// The configuration is as following:
Expand Down