mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 12:59:34 +00:00
Add Minio component (#23567)
* Add minio implementation * Static check changes * Added docstrings * Update docstrings * Update docstrings * Fix linter errors * Finally fix all docstring errors * Create services.yaml * Update CODEOWNERS * Final changes * Remove double underscores * Minor changes * Update config.yml * Review changes * Added tests * Fix lint errors * Move tests from unittest to pytest * Add minio as test requirement * Update test_minio_helper.py * Better event thread handling, added hass test * Update tests * Fixed lint errors * Update test_minio.py * Review changes * More review changes * Removed tests * Applied code style changes * Reformat test code
This commit is contained in:
committed by
Martin Hjelmare
parent
93a800a612
commit
eee2b2d543
48
tests/components/minio/common.py
Normal file
48
tests/components/minio/common.py
Normal file
@@ -0,0 +1,48 @@
|
||||
"""Minio Test event."""
|
||||
TEST_EVENT = {
|
||||
"Records": [
|
||||
{
|
||||
"eventVersion": "2.0",
|
||||
"eventSource": "minio:s3",
|
||||
"awsRegion": "",
|
||||
"eventTime": "2019-05-02T11:05:07Z",
|
||||
"eventName": "s3:ObjectCreated:Put",
|
||||
"userIdentity": {"principalId": "SO9KNO6YT9OGE39PQCZW"},
|
||||
"requestParameters": {
|
||||
"accessKey": "SO9KNO6YT9OGE39PQCZW",
|
||||
"region": "",
|
||||
"sourceIPAddress": "172.27.0.1",
|
||||
},
|
||||
"responseElements": {
|
||||
"x-amz-request-id": "159AD8E6F6805783",
|
||||
"x-minio-deployment-id": "90b265b8-bac5-413a-b12a-8915469fd769",
|
||||
"x-minio-origin-endpoint": "http://172.27.0.2:9000",
|
||||
},
|
||||
"s3": {
|
||||
"s3SchemaVersion": "1.0",
|
||||
"configurationId": "Config",
|
||||
"bucket": {
|
||||
"name": "test",
|
||||
"ownerIdentity": {"principalId": "SO9KNO6YT9OGE39PQCZW"},
|
||||
"arn": "arn:aws:s3:::test",
|
||||
},
|
||||
"object": {
|
||||
"key": "5jJkTAo.jpg",
|
||||
"size": 108368,
|
||||
"eTag": "1af324731637228cbbb0b2e8c07d4e50",
|
||||
"contentType": "image/jpeg",
|
||||
"userMetadata": {"content-type": "image/jpeg"},
|
||||
"versionId": "1",
|
||||
"sequencer": "159AD8E6F76DD9C4",
|
||||
},
|
||||
},
|
||||
"source": {
|
||||
"host": "",
|
||||
"port": "",
|
||||
"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_3) "
|
||||
"AppleWebKit/605.1.15 (KHTML, like Gecko) "
|
||||
"Version/12.0.3 Safari/605.1.15",
|
||||
},
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user