MCPcopy
hub / github.com/diffgram/diffgram / test_connection

Method test_connection

shared/connection/s3_connector.py:577–593  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

575 return True, log
576
577 def test_connection(self):
578 auth_result = self.connect()
579 if 'log' in auth_result:
580 return auth_result
581 # Test fecthing buckets
582 result_buckets = self.__list_buckets({})
583 bucket_names = result_buckets.get('result')
584
585 if 'log' in result_buckets:
586 return result_buckets
587
588 if bucket_names and len(bucket_names) > 0:
589 validation_result, log = self.validate_s3_connection_read_write(bucket_names[0])
590 if len(log['error'].keys()) > 0:
591 return {'log': log}
592
593 return result_buckets
594
595 @with_connection
596 def get_meta_data(self):

Callers 1

test_connection_apiFunction · 0.45

Calls 4

connectMethod · 0.95
__list_bucketsMethod · 0.95
getMethod · 0.45

Tested by

no test coverage detected