Skip to content

Commit

Permalink
Bumped aiohttp to latest to fix CVE-2023-49081
Browse files Browse the repository at this point in the history
  • Loading branch information
SStorm committed Dec 27, 2023
1 parent 36c441f commit 4d7d7e1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 12 deletions.
2 changes: 2 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ Changelog
Unreleased
----------

* Bumped aiohttp to latest to fix CVE-2023-49081

2.33.0 (2023-11-14)
-------------------

Expand Down
5 changes: 2 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,7 @@ def read(path: str) -> str:
"kubernetes-asyncio==21.7.1",
"PyYAML<7.0",
"prometheus_client==0.19.0",
# Versions 3.8+ incompatible with pytest-aiohttp.
"aiohttp<=3.7.4",
"aiohttp==3.9.1",
"wrapt==1.16.0",
],
extras_require={
Expand All @@ -72,7 +71,7 @@ def read(path: str) -> str:
"testing": [
"faker==18.3.1",
"pytest==7.4.3",
"pytest-aiohttp==0.3.0",
"pytest-aiohttp==1.0.5",
"pytest-asyncio==0.23.2",
"pytest-xdist==3.5.0", # enables parallel testing
"filelock==3.13.1", # used for locks when running in parallel mode
Expand Down
11 changes: 2 additions & 9 deletions tests/test_webhooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import pytest
from aiohttp import web
from aiohttp.helpers import BasicAuth
from aiohttp.test_utils import AioHTTPTestCase, unittest_run_loop
from aiohttp.test_utils import AioHTTPTestCase

from crate.operator.webhooks import (
WebhookAdminUsernameChangedPayload,
Expand Down Expand Up @@ -159,14 +159,14 @@ async def error_handler(request: web.Request):
return app

async def setUpAsync(self):
await super().setUpAsync()
self.webhook_client = WebhookClient()
self.webhook_client.configure(
f"{self.server.scheme}://{self.server.host}:{self.server.port}/some/path/",
"itsme",
"secr3t password",
)

@unittest_run_loop
async def test_send_scale_notification(self):
response = await self.webhook_client.send_notification(
"my-namespace",
Expand Down Expand Up @@ -208,7 +208,6 @@ async def test_send_scale_notification(self):
},
}

@unittest_run_loop
async def test_send_upgrade_notification(self):
response = await self.webhook_client.send_notification(
"my-namespace",
Expand Down Expand Up @@ -247,7 +246,6 @@ async def test_send_upgrade_notification(self):
},
}

@unittest_run_loop
async def test_send_delay_notification(self):
response = await self.webhook_client.send_notification(
"my-namespace",
Expand Down Expand Up @@ -281,7 +279,6 @@ async def test_send_delay_notification(self):
},
}

@unittest_run_loop
async def test_send_info_changed_notification(self):
response = await self.webhook_client.send_notification(
"my-namespace",
Expand Down Expand Up @@ -313,7 +310,6 @@ async def test_send_info_changed_notification(self):
},
}

@unittest_run_loop
async def test_send_admin_username_changed_notification(self):
response = await self.webhook_client.send_notification(
"my-namespace",
Expand Down Expand Up @@ -345,7 +341,6 @@ async def test_send_admin_username_changed_notification(self):
},
}

@unittest_run_loop
async def test_send_health_notification(self):
response = await self.webhook_client.send_notification(
"my-namespace",
Expand Down Expand Up @@ -377,7 +372,6 @@ async def test_send_health_notification(self):
},
}

@unittest_run_loop
async def test_error(self):
client = WebhookClient()
client.configure(
Expand All @@ -397,7 +391,6 @@ async def test_error(self):
)
assert response.status == 418

@unittest_run_loop
async def test_not_configured(self):
client = WebhookClient()
response = await client.send_notification(
Expand Down

0 comments on commit 4d7d7e1

Please sign in to comment.