PYTHON-4574 - FaaS detection logic mistakenly identifies EKS as AWS Lambda (#1908)

This commit is contained in:
Noah Stapp 2024-10-15 08:54:42 -04:00 committed by GitHub
parent 9e38c54fa0
commit 872fda179e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 32 additions and 0 deletions

View File

@ -2019,6 +2019,22 @@ class TestClient(AsyncIntegrationTest):
None,
)
async def test_handshake_09_container_with_provider(self):
await self._test_handshake(
{
ENV_VAR_K8S: "1",
"AWS_LAMBDA_RUNTIME_API": "1",
"AWS_REGION": "us-east-1",
"AWS_LAMBDA_FUNCTION_MEMORY_SIZE": "256",
},
{
"container": {"orchestrator": "kubernetes"},
"name": "aws.lambda",
"region": "us-east-1",
"memory_mb": 256,
},
)
def test_dict_hints(self):
self.db.t.find(hint={"x": 1})

View File

@ -1977,6 +1977,22 @@ class TestClient(IntegrationTest):
None,
)
def test_handshake_09_container_with_provider(self):
self._test_handshake(
{
ENV_VAR_K8S: "1",
"AWS_LAMBDA_RUNTIME_API": "1",
"AWS_REGION": "us-east-1",
"AWS_LAMBDA_FUNCTION_MEMORY_SIZE": "256",
},
{
"container": {"orchestrator": "kubernetes"},
"name": "aws.lambda",
"region": "us-east-1",
"memory_mb": 256,
},
)
def test_dict_hints(self):
self.db.t.find(hint={"x": 1})