community: support Confluence cookies (#28760)

**Description**: Some confluence instances don't support personal access
token, then cookie is a convenient way to authenticate. This PR adds
support for Confluence cookies.

**Twitter handle**: soulmachine
This commit is contained in:
Frank Dai
2024-12-17 09:16:36 -08:00
committed by GitHub
parent b745281eec
commit e81433497b
3 changed files with 25 additions and 5 deletions

View File

@@ -68,6 +68,16 @@ class TestConfluenceLoader:
session=requests.Session(),
)
with pytest.raises(ValueError):
ConfluenceLoader(
self.CONFLUENCE_URL,
username=self.MOCK_USERNAME,
api_key=self.MOCK_API_TOKEN,
cookies={
"key": "value",
},
)
def test_confluence_loader_initialization_from_env(
self, mock_confluence: MagicMock
) -> None: