Skip to content
Permalink
Browse files

Revert "Add test for pointcloud layers fetching and related permissions"

This reverts commit 30fe748.
  • Loading branch information
m-kuhn committed Feb 14, 2020
1 parent 2a0aa03 commit bf6915633cf12a556cd807b136e63509b6cdb33f
@@ -125,31 +125,23 @@ def test_postgis_connections(self):
self.assertEqual(srids_and_types,
[[0, 1], [0, 2], [0, 3], [0, 7], [3857, 1], [4326, 1]])

# Check TopoGeometry and Pointcloud layers are found in vector table names
# Check TopoGeometry layers are found in vector table names

tables = conn.tables('qgis_test', QgsAbstractDatabaseProviderConnection.Vector)
table_names = self._table_names(tables)
self.assertTrue('TopoLayer1' in table_names)
self.assertTrue('PointCloudPointLayer' in table_names)
self.assertTrue('PointCloudPatchLayer' in table_names)

self.assertTrue('geometries_table' in table_names)

# Revoke select permissions on topology.topology from qgis_test_user
conn.executeSql('REVOKE SELECT ON topology.topology FROM qgis_test_user')

# Revoke select permissions on pointcloud_format from qgis_test_user
conn.executeSql('REVOKE SELECT ON pointcloud_formats FROM qgis_test_user')

# Re-connect as the qgis_test_role role
newuri = self.uri + ' user=qgis_test_user password=qgis_test_user_password'
newconn = md.createConnection(newuri, {})
conn = md.createConnection(newuri, {})

# Check TopoGeometry and Pointcloud layers are not found in vector table names
tables = newconn.tables('qgis_test', QgsAbstractDatabaseProviderConnection.Vector)
tables = conn.tables('qgis_test', QgsAbstractDatabaseProviderConnection.Vector)
table_names = self._table_names(tables)
self.assertFalse('TopoLayer1' in table_names)
self.assertFalse('PointCloudPointLayer' in table_names)
self.assertFalse('PointCloudPatchLayer' in table_names)
self.assertTrue('geometries_table' in table_names)

# TODO: only revoke select permission on topology.layer, grant
@@ -161,13 +153,6 @@ def test_postgis_connections(self):
# TODO: only revoke select permission the actual topology
# schema associated with TopoLayer1

# TODO: only revoke select permission the pointcloud_columns
# table

# Grant select permissions back on topology.topology to qgis_test_user
conn.executeSql('GRANT SELECT ON topology.topology TO qgis_test_user')
conn.executeSql('GRANT SELECT ON pointcloud_formats TO qgis_test_user')

# error: ERROR: relation "qgis_test.raster1" does not exist
@unittest.skipIf(gdal.VersionInfo() < '2040000', 'This test requires GDAL >= 2.4.0')
def test_postgis_raster_rename(self):
@@ -5,14 +5,3 @@ ADD auth_system/certs_keys/postgres.key /etc/ssl/private/postgres_key.key
ADD auth_system/certs_keys/issuer_ca_cert.pem /etc/ssl/certs/issuer_ca_cert.pem

RUN chmod 400 /etc/ssl/private/postgres_key.key

# Compile and install PointCloud.
# NOTE: release 1.2.0 would not build against PostgreSQL-11:
# https://github.com/pgpointcloud/pointcloud/issues/248
RUN apt-get -y update; apt-get -y install build-essential autoconf postgresql-server-dev-11 libxml2-dev zlib1g-dev
RUN wget -O- \
https://github.com/pgpointcloud/pointcloud/archive/master.tar.gz \
| tar xz && \
cd pointcloud-master && \
./autogen.sh && ./configure && make && make install && \
cd .. && rm -Rf pointcloud-master
@@ -13,7 +13,6 @@ SCRIPTS="
tests/testdata/provider/testdata_pg_topology.sql
tests/testdata/provider/testdata_pg_domain.sql
tests/testdata/provider/testdata_pg_json.sql
tests/testdata/provider/testdata_pg_pointcloud.sql
"

dropdb --if-exists $DB

This file was deleted.

0 comments on commit bf69156

Please sign in to comment.
You can’t perform that action at this time.