Skip to content
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

Remove WFS support of wms.geo.admin.ch #9960

Merged
merged 1 commit into from
Aug 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
9 changes: 2 additions & 7 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,21 +95,16 @@ jobs:
if: always()
# Similar to: make tests-qgisserver
- run: >
ci/run-dc-logs docker-compose exec -T qgisserver-tests coverage run
--source=/var/www/plugins/geomapfish_qgisserver
--module pytest --verbose --color=yes --junitxml=/tmp/qgis.xml
/src/tests/functional
ci/run-dc-logs docker-compose exec -T qgisserver-tests
pytest --verbose --color=yes --junitxml=/tmp/qgis.xml /src/tests/functional
if: always()
- name: Extract tests artifacts
run: |
docker-compose exec -T tests coverage report
docker-compose exec -T tests coverage html --directory=/tmp/coverage
docker-compose exec -T qgisserver-tests coverage report
docker-compose exec -T qgisserver-tests coverage html --directory=/tmp/coverage
mkdir --parent artifacts/geoportal-coverage
mkdir --parent artifacts/qgisserver-plugin-coverage
docker cp c2cgeoportal_tests_1:/tmp/coverage/ artifacts/geoportal-coverage/
docker cp c2cgeoportal_qgisserver-tests_1:/tmp/coverage/ artifacts/qgisserver-plugin-coverage/
if: always()
- run: docker-compose down

Expand Down
27 changes: 15 additions & 12 deletions geoportal/tests/functional/test_themes_mixed.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,10 @@
from unittest import TestCase

from pyramid import testing
import transaction

from tests.functional import create_default_ogcserver, create_dummy_request, mapserv_url
from tests.functional import setup_common as setup_module # noqa
from tests.functional import teardown_common as teardown_module # noqa
import transaction


class TestThemesView(TestCase):
Expand All @@ -49,31 +48,34 @@ def setup_method(self, _):

from c2cgeoportal_commons.models import DBSession
from c2cgeoportal_commons.models.main import (
Theme,
LayerGroup,
Interface,
OGCServer,
LayerGroup,
LayerWMS,
LayerWMTS,
OGCServer,
Theme,
)

main = Interface(name="main")

ogc_server_internal = create_default_ogcserver()
ogc_server_external = OGCServer(
name="__test_ogc_server_external", url="http://wms.geo.admin.ch/", image_type="image/jpeg"
name="__test_ogc_server_external",
url="http://wms.geo.admin.ch/",
image_type="image/jpeg",
wfs_support=False,
)
ogc_server_valid_wms_version = OGCServer(
name="__test_ogc_server_valid_wms_version",
url=mapserv_url + "?VERSION=1.3.0",
image_type="image/jpeg",
wfs_support = False,
wfs_support=False,
)
ogc_server_invalid_wms_version = OGCServer(
name="__test_ogc_server_invalid_wms_version",
url=mapserv_url + "?VERSION=1.0.0",
image_type="image/jpeg",
wfs_support = False,
wfs_support=False,
)

layer_internal_wms = LayerWMS(name="__test_layer_internal_wms", public=True)
Expand Down Expand Up @@ -152,7 +154,7 @@ def teardown_method(self, _):
testing.tearDown()

from c2cgeoportal_commons.models import DBSession
from c2cgeoportal_commons.models.main import TreeItem, Interface, Metadata, Dimension, OGCServer
from c2cgeoportal_commons.models.main import Dimension, Interface, Metadata, OGCServer, TreeItem

DBSession.query(Metadata).delete()
DBSession.query(Dimension).delete()
Expand Down Expand Up @@ -215,9 +217,10 @@ def test_theme_mixed(self):
themes = theme_view.themes()
self.assertEqual(
self._get_filtered_errors(themes),
{"WARNING! an error 'The WMS version (1.0.0) you requested is not implemented. Please use 1.1.1 or 1.3",
'DescribeFeatureType from URL http://wms.geo.admin.ch/?SERVICE=WFS&VERSION=1.0.0&REQUEST=DescribeFeat'}
)
{
"WARNING! an error 'The WMS version (1.0.0) you requested is not implemented. Please use 1.1.1 or 1.3",
},
)
self.assertEqual(
[self._only_name(t, ["name", "mixed"]) for t in themes["themes"]],
[
Expand Down