-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
21 changed files
with
380 additions
and
294 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
64 changes: 64 additions & 0 deletions
64
...uilds/org.eclipse.mylyn.jenkins.tests/src/org/eclipse/mylyn/jenkins/tests/SuiteSetup.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2024 George Lindholm | ||
* All rights reserved. This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License v2.0 | ||
* which accompanies this distribution, and is available at | ||
* https://www.eclipse.org/legal/epl-v20.html. | ||
* | ||
* Contributors: | ||
* See git history | ||
*******************************************************************************/ | ||
|
||
package org.eclipse.mylyn.jenkins.tests; | ||
|
||
import org.eclipse.mylyn.commons.sdk.util.CommonTestUtil; | ||
import org.eclipse.mylyn.commons.sdk.util.ManagedSuite; | ||
import org.eclipse.mylyn.commons.sdk.util.TestConfiguration; | ||
import org.eclipse.mylyn.jenkins.tests.support.JenkinsFixture; | ||
import org.junit.jupiter.api.Test; | ||
|
||
public class SuiteSetup { | ||
private static boolean notLocalOnly = false; | ||
|
||
private static boolean useCertificateAuthentication = false; | ||
|
||
private static boolean fixtureActive = false; | ||
|
||
static { | ||
if (CommonTestUtil.fixProxyConfiguration()) { | ||
CommonTestUtil.dumpSystemInfo(System.err); | ||
} | ||
TestConfiguration configuration = ManagedSuite.getTestConfigurationOrCreateDefault(); | ||
|
||
if (!configuration.isLocalOnly()) { | ||
// network tests | ||
notLocalOnly = true; | ||
for (JenkinsFixture fixture : configuration.discover(JenkinsFixture.class, "jenkins")) { //$NON-NLS-1$ | ||
if (fixture.isExcluded() | ||
|| fixture.isUseCertificateAuthentication() && CommonTestUtil.isCertificateAuthBroken()) { | ||
continue; | ||
} | ||
fixtureActive = true; | ||
useCertificateAuthentication = !fixture.isUseCertificateAuthentication(); | ||
} | ||
} | ||
} | ||
|
||
@Test | ||
public void dummyTest() { | ||
// This is a dummy test to ensure the setup method is run | ||
} | ||
|
||
public static boolean isNotLocalOnly() { | ||
return notLocalOnly; | ||
} | ||
|
||
public static boolean isUseCertificateAuthentication() { | ||
return useCertificateAuthentication; | ||
} | ||
|
||
public static boolean isFixtureActive() { | ||
return fixtureActive; | ||
} | ||
|
||
} |
Oops, something went wrong.