Skip to content

Commit 496c6a5

Browse files
authored
Merge pull request #17 from CIAT-DAPA/develop
#major
2 parents 6321041 + cd855f4 commit 496c6a5

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

.github/workflows/test_pipeline.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
pip install -r ./src/requirements.txt
3939
- name: Run Tests
4040
run: |
41-
python -m unittest discover -s ./src/tests/ -p 'test_*.py' | grep -v "test_import_raster.py"
41+
python -m unittest discover -s ./src/tests/ -p 'test_*.py'
4242
4343
4444
# ------- END Scripts PROCCESS -------- #

src/requirements.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,5 @@ pytz==2022.7.1
2323
sentinels==1.0.0
2424
shapely==2.0.1
2525
six==1.16.0
26-
tqdm==4.65.0
26+
tqdm==4.65.0
27+
requests==2.28.1

src/tests/test_import_raster.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
11
import unittest
2-
from geo.Geoserver import Geoserver
2+
#from geo.Geoserver import Geoserver
33
import requests
44

55
geoserver_url = 'https://isa.ciat.cgiar.org/geoserver2'
66
username = 'gapuser'
77
password = 'pass'
88

99
# create a geoserver instance
10-
geo = Geoserver(geoserver_url, username=username, password=password)
10+
#geo = Geoserver(geoserver_url, username=username, password=password)
1111

1212
class TestGeoserver(unittest.TestCase):
1313

1414
def test_connection(self):
15-
"""Method to test the connection to Geoserver"""
16-
try:
15+
response =requests.get(geoserver_url)
16+
print(response)
17+
self.assertEqual(200, response.status_code)
18+
""" try:
1719
auth = (geo.username, geo.password)
1820
response = requests.get(geo.service_url, auth=auth)
1921
if response.status_code == 200:
@@ -25,8 +27,7 @@ def test_connection(self):
2527
return False
2628
2729
def test_connection_successful(self):
28-
"""Method to test if the connection to Geoserver was successful"""
29-
self.assertTrue(self.test_connection())
30+
self.assertTrue(self.test_connection()) """
3031

3132
if __name__ == '__main__':
3233
unittest.main()

0 commit comments

Comments
 (0)