Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
14d2bba
Add functional tests #16
ChiuchiuSorin Nov 7, 2023
d07aae7
Add functional tests #16
ChiuchiuSorin Nov 8, 2023
d629057
Add functional tests #16 - draft
ChiuchiuSorin Nov 10, 2023
1430526
Add functional tests #16
ChiuchiuSorin Nov 14, 2023
9089388
Merge licensing into functional-tests
ChiuchiuSorin Nov 14, 2023
441fb84
Add functional tests #16
ChiuchiuSorin Nov 17, 2023
c2116d0
Merge remote-tracking branch 'origin/main' into functional-tests
ChiuchiuSorin Nov 21, 2023
214479e
Add functional tests #16
ChiuchiuSorin Dec 13, 2023
38d87f8
Add functional tests #16
ChiuchiuSorin Dec 14, 2023
d7a45e8
Merge remote-tracking branch 'origin/main' into functional-tests
ChiuchiuSorin Dec 20, 2023
1736eb5
Add functional tests #16
ChiuchiuSorin Dec 20, 2023
c8c295f
Merge remote-tracking branch 'origin/main' into functional-tests
ChiuchiuSorin Jan 16, 2024
27d5f75
Add functional tests #16
ChiuchiuSorin Jan 17, 2024
e0f69bd
Merge remote-tracking branch 'origin/main' into functional-tests
ChiuchiuSorin Jan 18, 2024
d94abf8
Merge remote-tracking branch 'origin/main' into functional-tests
ChiuchiuSorin Jan 30, 2024
0dd9234
Add functional tests #16
ChiuchiuSorin Jan 30, 2024
70cffc6
Merge remote-tracking branch 'origin/main' into functional-tests
ChiuchiuSorin Feb 14, 2024
80c2439
Merge branch 'main' into functional-tests
ChiuchiuSorin Feb 19, 2024
9d198d8
Merge branch 'main' into functional-tests
ChiuchiuSorin Feb 27, 2024
5a6f418
Add functional tests #16
ChiuchiuSorin Feb 27, 2024
292a560
Merge branch 'main' into functional-tests
ChiuchiuSorin Mar 28, 2024
eec7de8
Add functional tests #16
ChiuchiuSorin Mar 28, 2024
035d5f5
Merge branch 'main' into functional-tests
ChiuchiuSorin Apr 1, 2024
98de17c
Add functional tests #16
ChiuchiuSorin Apr 1, 2024
2a58e5b
Merge branch 'main' into functional-tests
ChiuchiuSorin Apr 2, 2024
ffa9b92
Merge branch 'main' into functional-tests
ChiuchiuSorin Nov 25, 2024
71ebc08
[MISC] Add functional tests #16
ChiuchiuSorin Nov 25, 2024
14b883d
Add functional tests #16
ChiuchiuSorin Dec 4, 2024
05f446d
[MISC] Add functional tests #16
ChiuchiuSorin Dec 4, 2024
2c66f85
[MISC] Add functional tests #16
ChiuchiuSorin Jan 17, 2025
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 @@ -33,14 +33,12 @@
$escapetool.xml($services.localization.render('adminTools.dashboard.download.view.description'))
<ul>
<li>
<a href="$adminToolsFilesPath/xwikiConfig"
target="_blank">
<a href="$adminToolsFilesPath/xwikiConfig" id="xwiki-config-file" target="_blank">
$escapetool.xml($services.localization.render('adminTools.dashboard.download.view.configuration'))
</a>
</li>
<li>
<a href="$adminToolsFilesPath/xwikiProperties"
target="_blank">
<a href="$adminToolsFilesPath/xwikiProperties" id="xwiki-properties-file" target="_blank">
$escapetool.xml($services.localization.render('adminTools.dashboard.download.view.properties'))
</a>
</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
* @version $Id$
*/
@ComponentTest
class TomcatIdentifierTest
class TomcatInfoTest
{
@InjectMockComponents
private TomcatInfo tomcatIdentifier;
Expand Down
156 changes: 156 additions & 0 deletions application-admintools-test/application-admintools-test-docker/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,156 @@
<?xml version="1.0" encoding="UTF-8"?>

<!--
* See the NOTICE file distributed with this work for additional
* information regarding copyright ownership.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->

<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.xwiki.admintools</groupId>
<artifactId>application-admintools-test</artifactId>
<version>1.0.2-SNAPSHOT</version>
</parent>
<artifactId>application-admintools-test-docker</artifactId>
<name>Admin Tools Application - Tests - Functional Docker Tests</name>
<packaging>jar</packaging>
<properties>
<!-- Functional tests are allowed to output content to the console -->
<xwiki.surefire.captureconsole.skip>true</xwiki.surefire.captureconsole.skip>
</properties>
<dependencies>
<!-- Dependencies for tested features. -->
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>application-admintools-ui</artifactId>
<version>${project.version}</version>
<type>xar</type>
<exclusions>
<!-- Run the functional tests without a license. -->
<exclusion>
<groupId>com.xwiki.licensing</groupId>
<artifactId>application-licensing-licensor-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- Use a fake licensor script service while running the functional tests. -->
<dependency>
<groupId>com.xwiki.licensing</groupId>
<artifactId>application-licensing-test-api</artifactId>
<version>${licensing.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.xwiki.platform</groupId>
<artifactId>xwiki-platform-localization-rest-default</artifactId>
<version>${platform.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.xwiki.platform</groupId>
<artifactId>xwiki-platform-panels-ui</artifactId>
<version>${platform.version}</version>
<type>xar</type>
</dependency>
<!-- Remove when licensing application has the parent to 14.10. -->
<dependency>
<groupId>org.xwiki.platform</groupId>
<artifactId>xwiki-platform-model-api</artifactId>
<version>${platform.version}</version>
</dependency>
<dependency>
<groupId>org.xwiki.commons</groupId>
<artifactId>xwiki-commons-extension-api</artifactId>
<version>${commons.version}</version>
</dependency>
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
<version>3.0.2</version>
</dependency>
<!-- Remove to here -->
<!-- Test only dependencies. -->
<dependency>
<groupId>org.xwiki.platform</groupId>
<artifactId>xwiki-platform-test-docker</artifactId>
<version>${platform.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.xwiki.licensing</groupId>
<artifactId>application-licensing-test-dependencies</artifactId>
<version>${licensing.version}</version>
<type>pom</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>application-admintools-test-pageobjects</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.xwiki.platform</groupId>
<artifactId>xwiki-platform-panels-test-pageobjects</artifactId>
<version>${platform.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<testSourceDirectory>src/test/it</testSourceDirectory>
<plugins>
<!-- We need to explicitly include the failsafe plugin since it's not part of the default maven lifecycle -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>clover</id>
<!-- Add the Clover JAR to the WAR so that it's available at runtime when XWiki executes.
It's needed because instrumented jars in the WAR will call Clover APIs at runtime when they execute. -->
<dependencies>
<dependency>
<groupId>org.openclover</groupId>
<artifactId>clover</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<configuration>
<systemProperties combine.children="append">
<!-- Tell the Docker-based test to activate the Clover profile so that the Clover JAR is added to
WEB-INF/lib -->
<property>
<name>xwiki.test.ui.profiles</name>
<value>clover</value>
</property>
</systemProperties>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
/*
* See the NOTICE file distributed with this work for additional
* information regarding copyright ownership.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package com.xwiki.admintools.test.ui;

import java.util.List;

import org.junit.jupiter.api.extension.ConditionEvaluationResult;
import org.junit.jupiter.api.extension.ExecutionCondition;
import org.junit.jupiter.api.extension.ExtensionContext;
import org.xwiki.test.docker.internal.junit5.DockerTestUtils;
import org.xwiki.test.docker.junit5.TestConfiguration;
import org.xwiki.test.docker.junit5.servletengine.ServletEngine;

/**
* Prevent the execution of the PDF export tests from inside a Docker container (such as {@code xwiki-build}) when
* {@link ServletEngine#JETTY_STANDALONE} is used.
*
* @version $Id$
* @since 1.0
*/
public class AdminToolsExecutionCondition implements ExecutionCondition
{
private final List<ServletEngine> supportedServers = List.of(ServletEngine.TOMCAT);

@Override
public ConditionEvaluationResult evaluateExecutionCondition(ExtensionContext context)
{
if (DockerTestUtils.isInAContainer()) {
TestConfiguration configuration = DockerTestUtils.getTestConfiguration(context);
if (!supportedServers.contains(configuration.getServletEngine())) {
return ConditionEvaluationResult.disabled(String.format("Servlet engine [%s] is forbidden "
+ "when the PDF export tests are executed inside a Docker container, skipping.",
configuration.getServletEngine()));
}
}

return ConditionEvaluationResult.enabled("The configured servlet engine is supported, continuing.");
}
}
Loading