This repository has been archived by the owner on Oct 6, 2022. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[EAT] : Adding a testcase in EAT for JBEAP-12052.
- Loading branch information
Showing
8 changed files
with
988 additions
and
2 deletions.
There are no files selected for viewing
52 changes: 52 additions & 0 deletions
52
...additional/testsuite/jdkall/present/security/validations/CacheTypeValidationTestCase.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,52 @@ | ||
/* | ||
* JBoss, Home of Professional Open Source. | ||
* Copyright 2017, Red Hat, Inc., and individual contributors | ||
* as indicated by the @author tags. See the copyright.txt file in the | ||
* distribution for a full listing of individual contributors. | ||
* | ||
* 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 org.jboss.additional.testsuite.jdkall.present.security.validations; | ||
|
||
import java.io.BufferedReader; | ||
import java.io.File; | ||
import java.io.FileInputStream; | ||
import java.io.InputStream; | ||
import java.io.InputStreamReader; | ||
import org.jboss.eap.additional.testsuite.annotations.EapAdditionalTestsuite; | ||
import static org.junit.Assert.assertTrue; | ||
import org.junit.Test; | ||
|
||
//@apAdditionalTestsuite({"modules/testcases/jdkAll/Eap70x/security/src/main/java"}) | ||
public class CacheTypeValidationTestCase { | ||
@Test | ||
public void testCacheTypeValidation() throws Exception { | ||
ProcessBuilder pb = new ProcessBuilder("./startServer.sh").redirectErrorStream(true); | ||
pb.redirectError(new File("output.txt")); | ||
pb.start(); | ||
|
||
Thread.sleep(5000); | ||
|
||
InputStream in = new FileInputStream(new File("output.txt")); | ||
BufferedReader reader = new BufferedReader(new InputStreamReader(in)); | ||
String line; | ||
if ((line = reader.readLine()) == null) { | ||
assertTrue("The server should not start successfully.",false); | ||
} | ||
reader.close(); | ||
} | ||
} |
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
406 changes: 406 additions & 0 deletions
406
modules/testcases/jdkAll/Eap70x/security/src/test/config/standaloneEap7/standalone.xml
Large diffs are not rendered by default.
Oops, something went wrong.
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
96 changes: 96 additions & 0 deletions
96
modules/testcases/jdkAll/Eap70x/security/test2-configurations/pom.xml
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,96 @@ | ||
<?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> | ||
|
||
<!-- | ||
* ΙΔΕΑ : THE JBOSS TESTSUITE TO DEVELOP TESTS AGAINST INFINITE NUMBER OF JBOSS SERVERS | ||
--> | ||
|
||
<parent> | ||
<groupId>org.jboss</groupId> | ||
<artifactId>eap70x-additional-testsuite-security</artifactId> | ||
<version>1.0.2.Final</version> | ||
</parent> | ||
|
||
<artifactId>eap70x-additional-testsuite-security-configuration-2</artifactId> | ||
<name>eap70x additional testsuite: security : configuration-2</name> | ||
|
||
<properties> | ||
<standalone.conf>../src/test/config/standaloneEap7/standalone.xml</standalone.conf> | ||
<jboss.modules.dir>${basedir}/../../../../..</jboss.modules.dir> | ||
<server>eap7</server> | ||
</properties> | ||
|
||
<build> | ||
|
||
<!-- | ||
Surefire test executions | ||
--> | ||
<plugins> | ||
|
||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-surefire-plugin</artifactId> | ||
|
||
<configuration> | ||
<!-- Prevent test and server output appearing in console. --> | ||
<redirectTestOutputToFile>${testLogToFile}</redirectTestOutputToFile> | ||
<failIfNoTests>false</failIfNoTests> | ||
|
||
<!-- Arquillian's config files. --> | ||
<additionalClasspathElements combine.children="append"> | ||
<additionalClasspathElement>${jboss.modules.dir}/src/config/arqEap7</additionalClasspathElement> | ||
</additionalClasspathElements> | ||
|
||
</configuration> | ||
|
||
<executions> | ||
<execution> | ||
<id>default-test</id> | ||
<phase>test</phase> | ||
<goals> | ||
<goal>test</goal> | ||
</goals> | ||
<configuration> | ||
<!-- Tests to execute. --> | ||
<includes> | ||
<include>org/jboss/additional/testsuite/jdkall/present/security/validations/*TestCase.java</include> | ||
</includes> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
|
||
<!-- Build the server configuration --> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-antrun-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<id>build-basic-config</id> | ||
<phase>process-test-resources</phase> | ||
<goals> | ||
<goal>run</goal> | ||
</goals> | ||
<configuration> | ||
<target> | ||
<ant antfile="${jboss.modules.dir}/src/test/scripts/basic-build.xml"> | ||
<property name="workspace" value="/${jboss.modules.dir}" /> | ||
<property name="server" value="${server}" /> | ||
<property name="dist" value="jbossas" /> | ||
<property name="standaloneConfiguration" value="${standalone.conf}" /> | ||
<target name="build-basic-check"/> | ||
</ant> | ||
</target> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
|
||
</plugins> | ||
|
||
</build> | ||
|
||
</project> |
1 change: 1 addition & 0 deletions
1
modules/testcases/jdkAll/Eap70x/security/test2-configurations/startServer.sh
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 @@ | ||
./../../../../../servers/eap7/build/target/jbossas/bin/standalone.sh > output.txt |
Oops, something went wrong.