Skip to content
This repository has been archived by the owner on Oct 6, 2022. It is now read-only.

Commit

Permalink
[EAT] : Adding a testcase in EAT for JBEAP-12052.
Browse files Browse the repository at this point in the history
  • Loading branch information
panossot committed Aug 26, 2017
1 parent e28610b commit bdf0c40
Show file tree
Hide file tree
Showing 8 changed files with 988 additions and 2 deletions.
@@ -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();
}
}
1 change: 1 addition & 0 deletions modules/testcases/jdkAll/Eap70x/security/pom.xml
Expand Up @@ -21,6 +21,7 @@

<modules>
<module>test-configurations</module>
<module>test2-configurations</module>
</modules>

<build>
Expand Down

Large diffs are not rendered by default.

Expand Up @@ -60,7 +60,7 @@
<configuration>
<!-- Tests to execute. -->
<includes>
<include>org/jboss/additional/testsuite/jdkall/present/security/**/*TestCase.java</include>
<include>org/jboss/additional/testsuite/jdkall/present/security/roleToRolesMapping/*TestCase.java</include>
</includes>
</configuration>
</execution>
Expand Down
@@ -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>
@@ -0,0 +1 @@
./../../../../../servers/eap7/build/target/jbossas/bin/standalone.sh > output.txt

0 comments on commit bdf0c40

Please sign in to comment.