diff --git a/tests/sample_ingestion.py b/tests/sample_ingestion.py index f443e2ed..83e22c10 100644 --- a/tests/sample_ingestion.py +++ b/tests/sample_ingestion.py @@ -13,26 +13,26 @@ def main(): ingest_config = '{"schedule":{"delay":0,"runImmediately":true,"interval":"5m","type":"FixedRate"},"lastModifiedTime":1596087431,"recyclable":false,"configuration":{"source":{"bucket":"test-lichao","endpoint":"oss-cn-hangzhou-internal.aliyuncs.com","roleARN":"acs:ram::1049446484210612:role/aliyunlogimportossrole","prefix":" 2019/08/20/13/","compressionCodec":"snappy","restoreObjectEnabled":false,"pattern":"","format":{"skipInvalidRows":false,"timeField":"","type":"JSON"},"type":"AliyunOSS","encoding":"UTF-8"},"logstore":"233"},"createTime":1596087431,"displayName":"osstest","name":"ingest-1596087431-683090","description":"","state":"Enabled","type":"Ingestion","status":"SUCCESSED"}' res = client.create_ingestion(project, ingest_config) - print res.log_print() + res.log_print() res = client.list_ingestion(project) - print res.get_ingestions() + res.log_print() res = client.get_ingestion(project, "ingest-1596087431-683089") - print res.log_print() + res.log_print() res = client.stop_ingestion(project, "ingest-1596087431-683089") - print res.log_print() + res.log_print() res = client.start_ingestion(project, "ingest-1596087431-683089") - print res.log_print() + res.log_print() ingest_config = '{"schedule":{"delay":0,"runImmediately":true,"interval":"5m","type":"FixedRate"},"lastModifiedTime":1596087431,"recyclable":false,"configuration":{"source":{"bucket":"test-lichao","endpoint":"oss-cn-hangzhou-internal.aliyuncs.com","roleARN":"acs:ram::1049446484210612:role/aliyunlogimportossrole","prefix":" 2019/08/20/13/","compressionCodec":"snappy","restoreObjectEnabled":false,"pattern":"","format":{"skipInvalidRows":false,"timeField":"","type":"JSON"},"type":"AliyunOSS","encoding":"UTF-8"},"logstore":"666"},"createTime":1596087431,"displayName":"osstest","name":"ingest-1596087431-683089","description":"","state":"Enabled","type":"Ingestion","status":"SUCCESSED"}' res = client.update_ingestion(project, "ingest-1596087431-683089", ingest_config) - print res.log_print() + res.log_print() res = client.delete_ingestion(project, "ingest-1596087431-683089") - print res.log_print() + res.log_print() if __name__ == '__main__':