EOX GitLab Instance

Skip to content
Snippets Groups Projects
Commit 3a45f5a4 authored by Mussab Abdalla's avatar Mussab Abdalla
Browse files

setting swift auth

parent 76c82386
No related branches found
No related tags found
1 merge request!29Preprocessor test
import os
import sys
from osgeo import gdal
def set_gdal_swift_auth():
storage_url=os.environ['SWIFT_STORAGE_URL']
auth_token=os.environ['SWIFT_AUTH_TOKEN']
# setting gdal config
gdal.SetConfigOption("SWIFT_STORAGE_URL", storage_url)
gdal.SetConfigOption("SWIFT_AUTH_TOKEN", auth_token)
def test_preprocessor():
set_gdal_swift_auth()
image = gdal.Open('/vsiswift/preprocessor_results/KS03_AIS_PSH_1G_20160101T113020_20160101T113022_KGS_019339_75CE.tar/K3_20160101113014_19339_02281264_L1G.tif', gdal.GA_ReadOnly)
srcband = image.GetRasterBand(1)
assert srcband.Checksum() != None
assert srcband.Checksum() > 0
test_preprocessor()
\ No newline at end of file
import os
import csv
from osgeo import gdal
import pytest
import psycopg2
import paramiko
......@@ -54,7 +53,7 @@ def test_db_name(connection, identifiers):
db_name = connection.get_dsn_parameters()["dbname"]
assert coverage_id == identifier
assert db_name == os.environ['DB_USER']
assert db_name == os.environ['DB_NAME']
def compare_links(sftp, product_xml, product):
......@@ -87,11 +86,3 @@ def test_reporting(sftp_connection, identifiers):
if identifier in item:
compare_links(sftp_connection, item, identifier)
def test_preprocessor():
image = gdal.Open('/vsiswift/preprocessor_results/KS03_AIS_PSH_1G_20160101T113020_20160101T113022_KGS_019339_75CE.tar/K3_20160101113014_19339_02281264_L1G.tif', gdal.GA_ReadOnly)
srcband = image.GetRasterBand(1)
assert srcband.Checksum() != None
assert srcband.Checksum() > 0
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment