[ Bug]: auth0 测试固定项解析出名为 "https" 的主机,在每个 PR 上都会出现单元测试错误
作者: chiruu12创建于 2026年9月11日更新于 2026年9月11日
描述错误
unit-tests 在每个 PR 上都出现错误。tests/test_auth.py 中的四个测试从未开始运行:
ERROR at setup of test_api_key_with_header[MULTI_TENANT] - Failed: Timeout >20.0s
ERROR at setup of test_bearer_token[MULTI_TENANT] - Failed: Timeout >20.0s
ERROR at setup of test_webhook_api_key[MULTI_TENANT] - Failed: Timeout >20.0s
ERROR at setup of test_deleted_api_key_authentication[MULTI_TENANT] - Failed: Timeout >20.0s其中包含了以下内容:
socket.gaierror: [Errno -3] 临时名称解析失败
无法从 https://https://auth0domain.com/.well-known/openid-configuration 获取 OpenID 发现文档原因有两个,都在 tests/fixtures/client.py 中。MULTI_TENANT 分支将 AUTH0_DOMAIN 设置为 https://auth0domain.com。该变量的其他读者都期望一个裸主机:auth0_utils 将其格式化为 "https://{}/api/v2/",验证器也以同样的方式构建 self.issuer,而 tests/test_auth_new.py 使用 test-domain.auth0.com。由于验证器已经包含了一个方案,因此它向解析器请求一个名为 https 的主机,这就是上面提到的 gaierror。
内容来源: keephq/keep