Exemple #1
0
 def setup(self):
     TileCacheTestBase.setup(self)
     self.cache = GeopackageLevelCache(
         self.cache_dir,
         tile_grid=tile_grid(3857, name='global-webmarcator'),
         table_name='test_tiles',
     )
Exemple #2
0
    def setup(self):
        TileCacheTestBase.setup(self)

        self.cache = AzureBlobCache(
            'mapproxy',
            sas_token=
            "https://lvbdevstorage.blob.core.windows.net/container?sp=racwdl&st=2021-04-20T13:39:03Z&se=2021-04-20T21:39:03Z&spr=https&sv=2020-02-10&sr=c&sig=5uxGRb%2FAjyr9KSZmHCKJdwoxhFybG3fCHhDIW0OgRIU%3D",
            file_ext='png',
            directory_layout='tms')
    def setup(self):
        if not os.environ.get('MAPPROXY_TEST_MONGODB'):
            raise SkipTest()

        mongo_address = os.environ['MAPPROXY_TEST_MONGODB']
        layer_name = 'mapproxy_test_%d' % random.randint(0, 100000)

        TileCacheTestBase.setup(self)
        self.cache = MongoDBCache(mongo_address, layer_name, 'EPSG:3857')
Exemple #4
0
 def setup(self):
     TileCacheTestBase.setup(self)
     self.gpkg_file = os.path.join(self.cache_dir, 'tmp.gpkg')
     self.table_name = 'test_tiles'
     self.cache = GeopackageCache(
         self.gpkg_file,
         tile_grid=tile_grid(3857, name='global-webmarcator'),
         table_name=self.table_name,
     )
Exemple #5
0
    def setup(self):
        redis_host = os.environ['MAPPROXY_TEST_REDIS']
        self.host, self.port = redis_host.split(':')

        TileCacheTestBase.setup(self)

        self.cache = RedisCache(self.host,
                                int(self.port),
                                prefix='mapproxy-test',
                                db=1)
Exemple #6
0
    def setup(self):
        if not redis:
            raise SkipTest("redis required for Redis tests")

        redis_host = os.environ.get('MAPPROXY_TEST_REDIS')
        if not redis_host:
            raise SkipTest()
        self.host, self.port = redis_host.split(':')

        TileCacheTestBase.setup(self)

        self.cache = RedisCache(self.host, int(self.port), prefix='mapproxy-test', db=1)
Exemple #7
0
    def setup(self):
        if not os.environ.get(self.riak_url_env):
            raise SkipTest()

        riak_url = os.environ[self.riak_url_env]
        db_name = "mapproxy_test_%d" % random.randint(0, 100000)

        TileCacheTestBase.setup(self)

        self.cache = RiakCache(
            riak_url, db_name, "riak", tile_grid=tile_grid(3857, name="global-webmarcator"), lock_dir=self.cache_dir
        )
    def setup(self):
        if not os.environ.get('MAPPROXY_TEST_COUCHDB'):
            raise SkipTest()

        couch_address = os.environ['MAPPROXY_TEST_COUCHDB']
        db_name = 'mapproxy_test_%d' % random.randint(0, 100000)

        TileCacheTestBase.setup(self)

        md_template = CouchDBMDTemplate({'row': '{{y}}', 'tile_column': '{{x}}',
            'zoom': '{{level}}', 'time': '{{timestamp}}', 'coord': '{{wgs_tile_centroid}}'})
        self.cache = CouchDBCache(couch_address, db_name,
            file_ext='png', tile_grid=tile_grid(3857, name='global-webmarcator'),
            md_template=md_template)
    def setup(self):
        if not os.environ.get('MAPPROXY_TEST_COUCHDB'):
            raise SkipTest()

        couch_address = os.environ['MAPPROXY_TEST_COUCHDB']
        db_name = 'mapproxy_test_%d' % random.randint(0, 100000)

        TileCacheTestBase.setup(self)

        md_template = CouchDBMDTemplate({'row': '{{y}}', 'tile_column': '{{x}}',
            'zoom': '{{level}}', 'time': '{{timestamp}}', 'coord': '{{wgs_tile_centroid}}'})
        self.cache = CouchDBCache(couch_address, db_name,
            file_ext='png', tile_grid=tile_grid(3857, name='global-webmarcator'),
            md_template=md_template)
Exemple #10
0
    def setup(self):
        url = os.environ[self.riak_url_env]
        urlparts = urlparse.urlparse(url)
        protocol = urlparts.scheme.lower()
        node = {'host': urlparts.hostname}
        if ':' in urlparts.hostname:
            if protocol == 'pbc':
                node['pb_port'] = urlparts.port
            if protocol in ('http', 'https'):
                node['http_port'] = urlparts.port

        db_name = 'mapproxy_test_%d' % random.randint(0, 100000)

        TileCacheTestBase.setup(self)

        self.cache = RiakCache([node], protocol, db_name, tile_grid=tile_grid(3857, name='global-webmarcator'))
Exemple #11
0
    def setup(self):
        if not mock_s3 or not boto3:
            raise SkipTest("boto3 and moto required for S3 tests")

        TileCacheTestBase.setup(self)

        self.mock = mock_s3()
        self.mock.start()

        self.bucket_name = "test"
        dir_name = "mapproxy"

        boto3.client("s3").create_bucket(Bucket=self.bucket_name)

        self.cache = S3Cache(
            dir_name, file_ext="png", directory_layout="tms", bucket_name=self.bucket_name, profile_name=None
        )
Exemple #12
0
    def setup(self):
        if not os.environ.get(self.riak_url_env):
            raise SkipTest()

        url = os.environ[self.riak_url_env]
        urlparts = urlparse.urlparse(url)
        protocol = urlparts.scheme.lower()
        node = {'host': urlparts.hostname}
        if ':' in urlparts.hostname:
            if protocol == 'pbc':
                node['pb_port'] = urlparts.port
            if protocol in ('http', 'https'):
                node['http_port'] = urlparts.port

        db_name = 'mapproxy_test_%d' % random.randint(0, 100000)

        TileCacheTestBase.setup(self)

        self.cache = RiakCache([node], protocol, db_name, tile_grid=tile_grid(3857, name='global-webmarcator'))
Exemple #13
0
    def setup(self):
        TileCacheTestBase.setup(self)

        self.mock = mock_s3()
        self.mock.start()

        self.bucket_name = "test"
        dir_name = 'mapproxy'

        boto3.client("s3").create_bucket(Bucket=self.bucket_name)

        self.cache = S3Cache(
            dir_name,
            file_ext='png',
            directory_layout='tms',
            bucket_name=self.bucket_name,
            profile_name=None,
            _concurrent_writer=1,  # moto is not thread safe
        )
Exemple #14
0
    def setup(self):
        if not mock_s3 or not boto3:
            raise SkipTest("boto3 and moto required for S3 tests")

        TileCacheTestBase.setup(self)

        self.mock = mock_s3()
        self.mock.start()

        self.bucket_name = "test"
        dir_name = 'mapproxy'

        boto3.client("s3").create_bucket(Bucket=self.bucket_name)

        self.cache = S3Cache(
            dir_name,
            file_ext='png',
            directory_layout='tms',
            bucket_name=self.bucket_name,
            profile_name=None,
        )
Exemple #15
0
    def setup(self):
        if not mock_s3 or not boto3:
            raise SkipTest("boto3 and moto required for S3 tests")

        TileCacheTestBase.setup(self)

        self.mock = mock_s3()
        self.mock.start()

        self.bucket_name = "test"
        dir_name = 'mapproxy'

        boto3.client("s3").create_bucket(Bucket=self.bucket_name)

        self.cache = S3Cache(dir_name,
            file_ext='png',
            directory_layout='tms',
            bucket_name=self.bucket_name,
            profile_name=None,
            _concurrent_writer=1, # moto is not thread safe
        )
 def setup(self):
     TileCacheTestBase.setup(self)
     self.cache = CompactCacheV1(
         cache_dir=self.cache_dir,
     )
Exemple #17
0
 def setup(self):
     TileCacheTestBase.setup(self)
     self.cache = CompactCacheV1(cache_dir=self.cache_dir, )