Skip to content

Commit

Permalink
tycho-its reproducer p2Repository.downloadVerifyNoDigestAlgo (#2710)
Browse files Browse the repository at this point in the history
  • Loading branch information
dhendriks authored and laeubi committed Dec 5, 2023
1 parent b74eeb2 commit c9c707c
Show file tree
Hide file tree
Showing 11 changed files with 244 additions and 0 deletions.
82 changes: 82 additions & 0 deletions tycho-its/projects/p2Repository.downloadVerifyNoDigestAlgo/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>tycho-its-project.p2Repository.downloadVerifyNoDigestAlgo</groupId>
<artifactId>tycho-its-project.p2Repository.downloadVerifyNoDigestAlgo.root</artifactId>
<version>1.0.0-SNAPSHOT</version>

<packaging>pom</packaging>

<modules>
<module>test.feature</module>
<module>test.product</module>
<module>test.target</module>
</modules>

<build>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-maven-plugin</artifactId>
<version>${tycho-version}</version>
<extensions>true</extensions>
</plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-compiler-plugin</artifactId>
<version>${tycho-version}</version>
</plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-packaging-plugin</artifactId>
<version>${tycho-version}</version>
</plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>target-platform-configuration</artifactId>
<version>${tycho-version}</version>
<configuration>
<target>
<artifact>
<groupId>tycho-its-project.p2Repository.downloadVerifyNoDigestAlgo</groupId>
<artifactId>tycho-its-project.p2Repository.downloadVerifyNoDigestAlgo.target</artifactId>
<version>1.0.0-SNAPSHOT</version>
</artifact>
</target>
<executionEnvironment>org.eclipse.justj.openjdk.hotspot.jre.full-17</executionEnvironment>
<environments>
<environment>
<os>linux</os>
<ws>gtk</ws>
<arch>x86_64</arch>
</environment>
</environments>
<pomDependencies>consider</pomDependencies>
</configuration>
</plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-p2-plugin</artifactId>
<version>${tycho-version}</version>
<executions>
<execution>
<id>default-p2-metadata-default</id>
<configuration>
<attachP2Metadata>false</attachP2Metadata>
</configuration>
</execution>
<execution>
<id>attach-p2-metadata</id>
<phase>package</phase>
<goals>
<goal>p2-metadata</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bin.includes=feature.xml
root=file:extra.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Intentionally empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<feature
id="tycho-its-project.p2Repository.downloadVerifyNoDigestAlgo.feature"
label="Test Feature"
version="1.0.0.qualifier">

<requires>
<import feature="org.eclipse.platform" version="4.27.0" match="compatible"/>
<import feature="org.eclipse.justj.openjdk.hotspot.jre.full" version="17.0.5" match="compatible"/>
<import plugin="org.eclipse.pde.runtime"/>
</requires>

<plugin id="com.github.com-github-javabdd.com.github.javabdd" version="6.0.0" match="compatible"/>
<plugin id="org.apache.commons.commons-text" version="1.10.0" match="compatible"/>

</feature>
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>tycho-its-project.p2Repository.downloadVerifyNoDigestAlgo</groupId>
<artifactId>tycho-its-project.p2Repository.downloadVerifyNoDigestAlgo.root</artifactId>
<version>1.0.0-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>

<artifactId>tycho-its-project.p2Repository.downloadVerifyNoDigestAlgo.feature</artifactId>
<packaging>eclipse-feature</packaging>

</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<site>
</site>
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>tycho-its-project.p2Repository.downloadVerifyNoDigestAlgo</groupId>
<artifactId>tycho-its-project.p2Repository.downloadVerifyNoDigestAlgo.root</artifactId>
<version>1.0.0-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>

<artifactId>tycho-its-project.p2Repository.downloadVerifyNoDigestAlgo.product</artifactId>
<packaging>eclipse-repository</packaging>

<build>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-p2-repository-plugin</artifactId>
<version>${tycho-version}</version>
</plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-p2-director-plugin</artifactId>
<version>${tycho-version}</version>
</plugin>
</plugins>
</build>

</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<?pde version="3.5"?>
<product name="Test product" uid="tycho-its-project.p2Repository.downloadVerifyNoDigestAlgo.product" id="tycho-its-project.p2Repository.downloadVerifyNoDigestAlgo.product" application="org.eclipse.ui.ide.workbench" version="1.0.0.qualifier" useFeatures="true" includeLaunchers="true" autoIncludeRequirements="true">

<features>
<feature id="tycho-its-project.p2Repository.downloadVerifyNoDigestAlgo.feature" version="1.0.0.qualifier"/>
</features>

<configurations>
<plugin id="org.apache.felix.scr" autoStart="true" startLevel="2" />
<plugin id="org.eclipse.core.runtime" autoStart="true" startLevel="0" />
<plugin id="org.eclipse.equinox.common" autoStart="true" startLevel="2" />
<plugin id="org.eclipse.equinox.event" autoStart="true" startLevel="2" />
<plugin id="org.eclipse.equinox.simpleconfigurator" autoStart="true" startLevel="1" />
</configurations>

</product>
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>tycho-its-project.p2Repository.downloadVerifyNoDigestAlgo</groupId>
<artifactId>tycho-its-project.p2Repository.downloadVerifyNoDigestAlgo.root</artifactId>
<version>1.0.0-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>

<artifactId>tycho-its-project.p2Repository.downloadVerifyNoDigestAlgo.target</artifactId>
<packaging>eclipse-target-definition</packaging>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde version="3.8"?>
<target name="Test Target Platform">
<locations>
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.eclipse.equinox.executable.feature.group" version="0.0.0"/>
<unit id="org.eclipse.sdk.feature.group" version="0.0.0"/>
<repository location="https://download.eclipse.org/releases/2023-03"/>
</location>
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.eclipse.justj.openjdk.hotspot.jre.full.feature.group" version="0.0.0"/>
<repository location="https://download.eclipse.org/justj/jres/17/updates/release/17.0.5"/>
</location>
<location includeDependencyDepth="none" includeDependencyScopes="compile" includeSource="true" missingManifest="error" type="Maven">
<dependencies>
<dependency>
<groupId>com.github.com-github-javabdd</groupId>
<artifactId>com.github.javabdd</artifactId>
<version>6.0.0</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.1</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-text</artifactId>
<version>1.10.0</version>
<type>jar</type>
</dependency>
</dependencies>
</location>
</locations>
</target>
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*******************************************************************************
* Copyright (c) 2023 Contributors to the Eclipse Foundation
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*******************************************************************************/

package org.eclipse.tycho.test.p2Repository;

import org.apache.maven.it.Verifier;
import org.eclipse.tycho.test.AbstractTychoIntegrationTest;
import org.junit.Test;

public class DownloadVerifyNoDigestAlgoTest extends AbstractTychoIntegrationTest {
@Test
public void test() throws Exception {
Verifier verifier = getVerifier("p2Repository.downloadVerifyNoDigestAlgo", false);
verifier.executeGoal("verify");
verifier.verifyErrorFreeLog();
verifyTextNotInLog(verifier, "No digest algorithm is available to verify download");
}
}

0 comments on commit c9c707c

Please sign in to comment.