Skip to content

Commit

Permalink
Upgrade Geoserver with fix for oauth2 (GeoNode#11929)
Browse files Browse the repository at this point in the history
* Upgrade Geoserver with fix for oauth2

* fixes to black formaating
  • Loading branch information
giohappy authored Feb 2, 2024
1 parent c4c52c1 commit 3f382b2
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion docker-compose-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ services:

# Geoserver backend
geoserver:
image: geonode/geoserver:2.23.3-v1
image: geonode/geoserver:2.23.3-v2
container_name: geoserver4${COMPOSE_PROJECT_NAME}
healthcheck:
test: "curl -m 10 --fail --silent --write-out 'HTTP CODE : %{http_code}\n' --output /dev/null http://geoserver:8080/geoserver/ows"
Expand Down
2 changes: 1 addition & 1 deletion docker-compose-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ services:

# Geoserver backend
geoserver:
image: geonode/geoserver:2.23.3-v1
image: geonode/geoserver:2.23.3-v2
container_name: geoserver4${COMPOSE_PROJECT_NAME}
healthcheck:
test: "curl -m 10 --fail --silent --write-out 'HTTP CODE : %{http_code}\n' --output /dev/null http://geoserver:8080/geoserver/ows"
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ services:

# Geoserver backend
geoserver:
image: geonode/geoserver:2.23.3-v1
image: geonode/geoserver:2.23.3-v2
container_name: geoserver4${COMPOSE_PROJECT_NAME}
healthcheck:
test: "curl -m 10 --fail --silent --write-out 'HTTP CODE : %{http_code}\n' --output /dev/null http://geoserver:8080/geoserver/ows"
Expand Down
6 changes: 3 additions & 3 deletions geonode/base/api/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -1951,10 +1951,10 @@ def test_set_resource_thumbnail(self):
self.assertEqual(response.json(), "The url must be of an image with format (png, jpeg or jpg)")

# using Base64 data as an ASCII byte string
data["file"] = (
"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAABHNCSVQICAgI\
data[
"file"
] = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAABHNCSVQICAgI\
fAhkiAAAABl0RVh0U29mdHdhcmUAZ25vbWUtc2NyZWVuc2hvdO8Dvz4AAAANSURBVAiZYzAxMfkPAALYAZzx61+bAAAAAElFTkSuQmCC"
)
with patch("geonode.base.models.is_monochromatic_image") as _mck:
_mck.return_value = False
response = self.client.put(url, data=data, format="json")
Expand Down
24 changes: 12 additions & 12 deletions geonode/harvesting/harvesters/geonodeharvester.py
Original file line number Diff line number Diff line change
Expand Up @@ -433,14 +433,14 @@ def _get_resource_list_params(self, offset: typing.Optional[int] = 0) -> typing.
result["filter{title.icontains}"] = self.resource_title_filter
if self.start_date_filter is not None:
start_date = dateutil.parser.parse(self.start_date_filter)
result["filter{date.gte}"] = (
f"{start_date.astimezone(dt.timezone.utc).replace(microsecond=0).isoformat().split('+')[0]}Z"
)
result[
"filter{date.gte}"
] = f"{start_date.astimezone(dt.timezone.utc).replace(microsecond=0).isoformat().split('+')[0]}Z"
if self.end_date_filter is not None:
end_date = dateutil.parser.parse(self.end_date_filter)
result["filter{date.lte}"] = (
f"{end_date.astimezone(dt.timezone.utc).replace(microsecond=0).isoformat().split('+')[0]}Z"
)
result[
"filter{date.lte}"
] = f"{end_date.astimezone(dt.timezone.utc).replace(microsecond=0).isoformat().split('+')[0]}Z"
if self.keywords_filter is not None:
result["filter{keywords.slug.in}"] = self.keywords_filter
if self.categories_filter is not None:
Expand Down Expand Up @@ -738,14 +738,14 @@ def _get_resource_list_params(self, offset: typing.Optional[int] = 0) -> typing.
result["title__icontains"] = self.resource_title_filter
if self.start_date_filter is not None:
start_date = dateutil.parser.parse(self.start_date_filter)
result["date__gte"] = (
f"{start_date.astimezone(dt.timezone.utc).replace(microsecond=0).isoformat().split('+')[0]}Z"
)
result[
"date__gte"
] = f"{start_date.astimezone(dt.timezone.utc).replace(microsecond=0).isoformat().split('+')[0]}Z"
if self.end_date_filter is not None:
end_date = dateutil.parser.parse(self.end_date_filter)
result["date__lte"] = (
f"{end_date.astimezone(dt.timezone.utc).replace(microsecond=0).isoformat().split('+')[0]}Z"
)
result[
"date__lte"
] = f"{end_date.astimezone(dt.timezone.utc).replace(microsecond=0).isoformat().split('+')[0]}Z"
if self.keywords_filter is not None:
result["keywords__slug__in"] = ",".join(self.keywords_filter)
if self.categories_filter is not None:
Expand Down

0 comments on commit 3f382b2

Please sign in to comment.