org.sonatype.nexus.pax.exam.NexusPaxExamSupport Java Examples

The following examples show how to use org.sonatype.nexus.pax.exam.NexusPaxExamSupport. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: CleanupTaskConanProxyIT.java    From nexus-repository-conan with Eclipse Public License 1.0 6 votes vote down vote up
@Before
public void setup() throws Exception {
  BaseUrlHolder.set(this.nexusUrl.toString());
  testData.addDirectory(NexusPaxExamSupport.resolveBaseFile("target/it-resources/conan"));
  testData.addDirectory(NexusPaxExamSupport.resolveBaseFile("target/test-classes/conan"));

  server = Server.withPort(0)
      .serve("/" + JSON_FOR_MODERN_CPP_URL)
      .withBehaviours(Behaviours.file(testData.resolveFile(DOWNLOAD_URLS_FILE_NAME)))
      .serve("/" + LIB_URL)
      .withBehaviours(Behaviours.file(testData.resolveFile(LIB_DOWNLOAD_URLS_FILE_NAME)))
      .start();

  proxyRepo = repos.createConanProxy(testName.getMethodName(), server.getUrl().toExternalForm());
  URL repositoryUrl = repositoryBaseUrl(proxyRepo);
  proxyClient = new ConanClient(
      clientBuilder(repositoryUrl).build(),
      clientContext(),
      repositoryUrl.toURI()
  );
  proxyClient.get(JSON_FOR_MODERN_CPP_URL);
}
 
Example #2
Source File: HelmContentITSupport.java    From nexus-repository-helm with Eclipse Public License 1.0 5 votes vote down vote up
@Configuration
public static Option[] configureNexus() {
  return NexusPaxExamSupport.options(
      NexusITSupport.configureNexusBase(),
      nexusFeature("org.sonatype.nexus.plugins", "nexus-repository-helm"),
      systemProperty("nexus-exclude-features").value("nexus-cma-community, nexus-community-feature")
  );
}
 
Example #3
Source File: ConanProxySearchIT.java    From nexus-repository-conan with Eclipse Public License 1.0 5 votes vote down vote up
@Configuration
public static Option[] configureNexus() {
  return NexusPaxExamSupport.options(
      NexusITSupport.configureNexusBase(),
      nexusFeature("org.sonatype.nexus.plugins", "nexus-repository-conan")
  );
}
 
Example #4
Source File: RRoutingRuleIT.java    From nexus-repository-r with Eclipse Public License 1.0 5 votes vote down vote up
@Configuration
public static Option[] configureNexus() {
  return NexusPaxExamSupport.options(
      NexusITSupport.configureNexusBase(),
      nexusFeature("org.sonatype.nexus.plugins", "nexus-repository-r")
  );
}
 
Example #5
Source File: RGroupIT.java    From nexus-repository-r with Eclipse Public License 1.0 5 votes vote down vote up
@Configuration
public static Option[] configureNexus() {
  return NexusPaxExamSupport.options(
      NexusITSupport.configureNexusBase(),
      nexusFeature("org.sonatype.nexus.plugins", "nexus-repository-r"),
      editConfigurationFileExtend(NEXUS_PROPERTIES_FILE, "nexus.r.packagesBuilder.interval",
          String.valueOf(METADATA_PROCESSING_DELAY_MILLIS))
  );
}
 
Example #6
Source File: RProxyIT.java    From nexus-repository-r with Eclipse Public License 1.0 5 votes vote down vote up
@Configuration
public static Option[] configureNexus() {
  return NexusPaxExamSupport.options(
      NexusITSupport.configureNexusBase(),
      nexusFeature("org.sonatype.nexus.plugins", "nexus-repository-r")
  );
}
 
Example #7
Source File: ConanRoutingRuleIT.java    From nexus-repository-conan with Eclipse Public License 1.0 5 votes vote down vote up
@Configuration
public static Option[] configureNexus() {
  return NexusPaxExamSupport.options(
      NexusITSupport.configureNexusBase(),
      nexusFeature("org.sonatype.nexus.plugins", "nexus-repository-conan")
  );
}
 
Example #8
Source File: CleanupTaskRIT.java    From nexus-repository-r with Eclipse Public License 1.0 5 votes vote down vote up
@Configuration
public static Option[] configureNexus() {
  return NexusPaxExamSupport.options(
      NexusITSupport.configureNexusBase(),
      nexusFeature("org.sonatype.nexus.plugins", "nexus-repository-r"),
      editConfigurationFileExtend(NEXUS_PROPERTIES_FILE, "nexus.r.packagesBuilder.interval",
          String.valueOf(METADATA_PROCESSING_DELAY_MILLIS))
  );
}
 
Example #9
Source File: RRestoreBlobIT.java    From nexus-repository-r with Eclipse Public License 1.0 5 votes vote down vote up
@Configuration
public static Option[] configureNexus() {
  return NexusPaxExamSupport.options(
      NexusITSupport.configureNexusBase(),
      nexusFeature("org.sonatype.nexus.plugins", "nexus-repository-r"),
      nexusFeature("org.sonatype.nexus.plugins", "nexus-restore-r")
  );
}
 
Example #10
Source File: RHostedIT.java    From nexus-repository-r with Eclipse Public License 1.0 5 votes vote down vote up
@Configuration
public static Option[] configureNexus() {
  return NexusPaxExamSupport.options(
      NexusITSupport.configureNexusBase(),
      nexusFeature("org.sonatype.nexus.plugins", "nexus-repository-r"),
      editConfigurationFileExtend(NEXUS_PROPERTIES_FILE, "nexus.r.packagesBuilder.interval",
          String.valueOf(METADATA_PROCESSING_DELAY_MILLIS))
  );
}
 
Example #11
Source File: CleanupTaskConanProxyIT.java    From nexus-repository-conan with Eclipse Public License 1.0 5 votes vote down vote up
@Configuration
public static Option[] configureNexus() {
  return NexusPaxExamSupport.options(
      NexusITSupport.configureNexusBase(),
      nexusFeature("org.sonatype.nexus.plugins", "nexus-repository-conan")
  );
}
 
Example #12
Source File: HelmITConfig.java    From nexus-repository-helm with Eclipse Public License 1.0 5 votes vote down vote up
public static Option[] configureHelmBase() {
  return NexusPaxExamSupport.options(
      NexusITSupport.configureNexusBase(),
      nexusFeature("org.sonatype.nexus.plugins", "nexus-repository-helm"),
      systemProperty("nexus-exclude-features").value("nexus-cma-community, nexus-community-feature")
  );
}
 
Example #13
Source File: ConanProxyIT.java    From nexus-repository-conan with Eclipse Public License 1.0 5 votes vote down vote up
@Configuration
public static Option[] configureNexus() {
  return NexusPaxExamSupport.options(
      NexusITSupport.configureNexusBase(),
      nexusFeature("org.sonatype.nexus.plugins", "nexus-repository-conan")
  );
}
 
Example #14
Source File: HelmRestoreBlobIT.java    From nexus-repository-helm with Eclipse Public License 1.0 5 votes vote down vote up
@Configuration
public static Option[] configureNexus() {
  return NexusPaxExamSupport.options(
      configureHelmBase(),
      nexusFeature("org.sonatype.nexus.plugins", "nexus-restore-helm")
  );
}
 
Example #15
Source File: P2RestoreBlobIT.java    From nexus-repository-p2 with Eclipse Public License 1.0 5 votes vote down vote up
@Configuration
public static Option[] configureNexus() {
  return NexusPaxExamSupport.options(
      NexusITSupport.configureNexusBase(),
      nexusFeature("org.sonatype.nexus.plugins", "nexus-repository-p2"),
      nexusFeature("org.sonatype.nexus.plugins", "nexus-restore-p2")
  );
}
 
Example #16
Source File: P2RoutingRuleIT.java    From nexus-repository-p2 with Eclipse Public License 1.0 5 votes vote down vote up
@Configuration
public static Option[] configureNexus() {
  return NexusPaxExamSupport.options(
      NexusITSupport.configureNexusBase(),
      nexusFeature("org.sonatype.nexus.plugins", "nexus-repository-p2")
  );
}
 
Example #17
Source File: P2ProxyIT.java    From nexus-repository-p2 with Eclipse Public License 1.0 5 votes vote down vote up
@Configuration
public static Option[] configureNexus() {
  return NexusPaxExamSupport.options(
      NexusITSupport.configureNexusBase(),
      nexusFeature("org.sonatype.nexus.plugins", "nexus-repository-p2")
  );
}
 
Example #18
Source File: CleanupTaskP2ProxyIT.java    From nexus-repository-p2 with Eclipse Public License 1.0 5 votes vote down vote up
@Before
public void setup() throws Exception {
  BaseUrlHolder.set(this.nexusUrl.toString());
  testData.addDirectory(NexusPaxExamSupport.resolveBaseFile("target/test-classes/p2"));
  server = Server.withPort(0)
      .serve("/" + VALID_PACKAGE_URL)
      .withBehaviours(Behaviours.file(testData.resolveFile(PACKAGE_NAME)))
      .serve("/" + VALID_HELP_PACKAGE_URL)
      .withBehaviours(Behaviours.file(testData.resolveFile(HELP_PACKAGE_NAME)))
      .start();

  proxyRepo = repos.createP2Proxy(testName.getMethodName(), server.getUrl().toExternalForm());
  proxyClient = p2Client(proxyRepo);
  deployArtifacts(VALID_HELP_PACKAGE_URL);
}
 
Example #19
Source File: CleanupTaskP2ProxyIT.java    From nexus-repository-p2 with Eclipse Public License 1.0 5 votes vote down vote up
@Configuration
public static Option[] configureNexus() {
  return NexusPaxExamSupport.options(
      NexusITSupport.configureNexusBase(),
      nexusFeature("org.sonatype.nexus.plugins", "nexus-repository-p2")
  );
}
 
Example #20
Source File: OrientSearchTestHelper.java    From nexus-public with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * Waits for indexing to finish and makes sure any updates are available to search.
 *
 * General flow is component/asset events -> bulk index requests -> search indexing.
 */
@Override
public void waitForSearch() throws Exception {
  NexusPaxExamSupport.waitFor(eventManager::isCalmPeriod);
  indexService.flush(false); // no need for full fsync here
  NexusPaxExamSupport.waitFor(indexService::isCalmPeriod);
}
 
Example #21
Source File: DeploymentFailsForFirestoreNativeIT.java    From nexus-blobstore-google-cloud with Eclipse Public License 1.0 5 votes vote down vote up
@Configuration
public static Option[] configureNexus() {
  return NexusPaxExamSupport.options(
      NexusITSupport.configureNexusBase(),
      nexusFeature("org.sonatype.nexus.plugins", "nexus-blobstore-google-cloud")
  );
}
 
Example #22
Source File: ComposerProxyIT.java    From nexus-repository-composer with Eclipse Public License 1.0 5 votes vote down vote up
@Configuration
public static Option[] configureNexus() {
  return NexusPaxExamSupport.options(
      NexusITSupport.configureNexusBase(),
      nexusFeature("org.sonatype.nexus.plugins", "nexus-repository-composer")
  );
}
 
Example #23
Source File: SuccessfulDeploymentIT.java    From nexus-blobstore-google-cloud with Eclipse Public License 1.0 5 votes vote down vote up
@Configuration
public static Option[] configureNexus() {
  return NexusPaxExamSupport.options(
      NexusITSupport.configureNexusBase(),
      nexusFeature("org.sonatype.nexus.plugins", "nexus-blobstore-google-cloud")
  );
}
 
Example #24
Source File: WaitForCalmPeriod.java    From nexus-public with Eclipse Public License 1.0 4 votes vote down vote up
@Override
public Void call() throws Exception {
  NexusPaxExamSupport.waitFor(eventManager::isCalmPeriod);
  return null;
}
 
Example #25
Source File: MavenTestHelper.java    From nexus-public with Eclipse Public License 1.0 4 votes vote down vote up
private File mvnBaseDir(final String project) {
  return NexusPaxExamSupport
      .resolveBaseFile("target/" + getClass().getSimpleName() + "-" + Math.random() + "/" + project);
}
 
Example #26
Source File: ConanITSupport.java    From nexus-repository-conan with Eclipse Public License 1.0 4 votes vote down vote up
public ConanITSupport() {
  testData.addDirectory(NexusPaxExamSupport.resolveBaseFile("target/it-resources/conan"));

  testData.addDirectory(NexusPaxExamSupport.resolveBaseFile("target/test-classes/conan"));
}
 
Example #27
Source File: CleanupTaskRIT.java    From nexus-repository-r with Eclipse Public License 1.0 4 votes vote down vote up
@Before
public void setup() {
  testData.addDirectory(NexusPaxExamSupport.resolveBaseFile("target/test-classes/r"));
  repository = repos.createRHosted(testName.getMethodName());
  deployArtifacts(NAMES);
}
 
Example #28
Source File: RITSupport.java    From nexus-repository-r with Eclipse Public License 1.0 4 votes vote down vote up
public RITSupport() {
  testData.addDirectory(NexusPaxExamSupport.resolveBaseFile("target/test-classes/r"));
}
 
Example #29
Source File: CleanupTaskHelmIT.java    From nexus-repository-helm with Eclipse Public License 1.0 4 votes vote down vote up
@Before
public void setup() {
  testData.addDirectory(NexusPaxExamSupport.resolveBaseFile("target/test-classes/helm"));
  repository = repos.createHelmHosted(testName.getMethodName());
  assertThat(deployArtifacts(NAMES), is(NAMES.length));
}
 
Example #30
Source File: HelmContentITSupport.java    From nexus-repository-helm with Eclipse Public License 1.0 4 votes vote down vote up
public HelmContentITSupport() {
  testData.addDirectory(NexusPaxExamSupport.resolveBaseFile("target/test-classes/helm"));
}