-
-
Notifications
You must be signed in to change notification settings - Fork 100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Re-activate the remote WMS integration tests #1446
Open
tfr42
wants to merge
3
commits into
deegree:main
Choose a base branch
from
lat-lon:activateRemoteWMSIntegrationTest-8673-1246
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+174
−27
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
125 changes: 125 additions & 0 deletions
125
...s-remoteows-tests/src/test/java/org/deegree/services/wms/RemoteWMSGfiIntegrationTest.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,125 @@ | ||
//$HeadURL$ | ||
/*---------------------------------------------------------------------------- | ||
This file is part of deegree, http://deegree.org/ | ||
Copyright (C) 2001-2010 by: | ||
- Department of Geography, University of Bonn - | ||
and | ||
- lat/lon GmbH - | ||
|
||
This library 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 library 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 library; if not, write to the Free Software Foundation, Inc., | ||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
|
||
Contact information: | ||
|
||
lat/lon GmbH | ||
Aennchenstr. 19, 53177 Bonn | ||
Germany | ||
http://lat-lon.de/ | ||
|
||
Department of Geography, University of Bonn | ||
Prof. Dr. Klaus Greve | ||
Postfach 1147, 53001 Bonn | ||
Germany | ||
http://www.geographie.uni-bonn.de/deegree/ | ||
|
||
Occam Labs UG (haftungsbeschränkt) | ||
Godesberger Allee 139, 53175 Bonn | ||
Germany | ||
http://www.occamlabs.de/ | ||
|
||
e-mail: [email protected] | ||
----------------------------------------------------------------------------*/ | ||
|
||
package org.deegree.services.wms; | ||
|
||
import org.apache.commons.io.IOUtils; | ||
import org.junit.Ignore; | ||
import org.junit.Test; | ||
import org.junit.runner.RunWith; | ||
import org.junit.runners.Parameterized; | ||
import org.junit.runners.Parameterized.Parameters; | ||
import org.slf4j.Logger; | ||
import org.xmlunit.matchers.CompareMatcher; | ||
|
||
import java.io.IOException; | ||
import java.util.ArrayList; | ||
import java.util.Collection; | ||
import java.util.List; | ||
|
||
import static org.deegree.commons.utils.net.HttpUtils.UTF8STRING; | ||
import static org.deegree.commons.utils.net.HttpUtils.retrieve; | ||
import static org.hamcrest.MatcherAssert.assertThat; | ||
import static org.slf4j.LoggerFactory.getLogger; | ||
|
||
/** | ||
* <code>RemoteWMSIntegrationTest</code> | ||
* | ||
* @author <a href="mailto:[email protected]">Andreas Schmitz</a> | ||
* @author last edited by: $Author: mschneider $ | ||
* @version $Revision: 31882 $, $Date: 2011-09-15 02:05:04 +0200 (Thu, 15 Sep 2011) $ | ||
*/ | ||
|
||
@Ignore | ||
@RunWith(Parameterized.class) | ||
public class RemoteWMSGfiIntegrationTest { | ||
|
||
private static final Logger LOG = getLogger( RemoteWMSGfiIntegrationTest.class ); | ||
|
||
private final String resourceName; | ||
|
||
private final String request; | ||
|
||
private final String expected; | ||
|
||
public RemoteWMSGfiIntegrationTest( String resourceName ) | ||
throws IOException { | ||
this.resourceName = resourceName; | ||
this.request = IOUtils.toString( | ||
RemoteWMSGfiIntegrationTest.class.getResourceAsStream( | ||
"/requests/" + resourceName + ".kvp" ) ); | ||
this.expected = IOUtils.toString( | ||
RemoteWMSGfiIntegrationTest.class.getResourceAsStream( | ||
"/requests/" + resourceName + ".xml" ) ); | ||
} | ||
|
||
@Parameters(name = "{index}: {0}") | ||
public static Collection<Object[]> getParameters() { | ||
List<Object[]> requests = new ArrayList<>(); | ||
requests.add( new Object[] { "featureinfofromdeegree" } ); | ||
return requests; | ||
} | ||
|
||
@Test | ||
public void testGfiResponse() | ||
throws | ||
Exception { | ||
String request = createRequest(); | ||
LOG.info( "Requesting {}", request ); | ||
String actual = retrieve( UTF8STRING, request ); | ||
|
||
assertThat( "GFI Response for " + resourceName + " does not match expected response", actual, | ||
CompareMatcher.isSimilarTo( expected ).ignoreWhitespace() ); | ||
} | ||
|
||
private String createRequest() { | ||
StringBuffer sb = new StringBuffer(); | ||
sb.append( "http://localhost:" ); | ||
sb.append( "8090" ); | ||
sb.append( "/" ); | ||
sb.append( System.getProperty( "deegree-wms-remoteows-webapp", "deegree-wms-remoteows-tests" ) ); | ||
sb.append( "/services/wms" ); | ||
if ( !request.startsWith( "?" ) ) | ||
sb.append( "?" ); | ||
sb.append( request ); | ||
return sb.toString(); | ||
} | ||
} |
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
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
Binary file added
BIN
+88.7 KB
...ree-tests/deegree-wms-remoteows-tests/src/test/resources/requests/multiple4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
File renamed without changes
Binary file added
BIN
+81.9 KB
...ts/deegree-wms-remoteows-tests/src/test/resources/requests/optionsmultiple4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
Binary file added
BIN
+52.4 KB
...ests/deegree-wms-remoteows-tests/src/test/resources/requests/optionssingle3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Binary file added
BIN
+509 KB
...ests/deegree-wms-remoteows-tests/src/test/resources/requests/parametersext4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
Binary file added
BIN
+46.3 KB
deegree-tests/deegree-wms-remoteows-tests/src/test/resources/requests/single3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion
2
deegree-tests/deegree-wms-remoteows-tests/src/test/resources/requests/timeout.kvp
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 |
---|---|---|
@@ -1 +1 @@ | ||
?REQUEST=GetMap&SERVICE=WMS&VERSION=1.1.1&WIDTH=1193&HEIGHT=857&LAYERS=timeout&TRANSPARENT=TRUE&FORMAT=image%2Fpng&BBOX=389861.0150035092,4426483.167746064,531448.4199583281,4528193.482956693&SRS=EPSG:26912&STYLES= | ||
?REQUEST=GetMap&SERVICE=WMS&VERSION=1.1.1&WIDTH=1193&HEIGHT=857&LAYERS=timeout&TRANSPARENT=TRUE&FORMAT=image%2Fpng&BBOX=389861.0150035092,4426483.167746064,531448.4199583281,4528193.482956693&SRS=EPSG:26912&STYLES=&EXCEPTIONS=application/vnd.ogc.se_inimage |
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Binary file added
BIN
+85.7 KB
...sts/deegree-wms-remoteows-tests/src/test/resources/requests/transformedgif4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the base64 encoded output to STDOUT was intentional, because by default the LOG is very strongly suppressed on the CI/CD system.
Had you checked whether the results still appear in the CI/CD log after the change in case of an image error ?