MCPcopy Create free account
hub / github.com/agenticsorg/edge-agents / MockEC2Service

Class MockEC2Service

scripts/agents/devops/tests/custom/run_cli_tests.py:37–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35
36# Mock EC2 service for testing
37class MockEC2Service:
38 def __init__(self, credentials=None):
39 self.credentials = credentials
40
41 def list_instances(self, filters=None):
42 return [
43 {
44 'InstanceId': 'i-1234567890abcdef0',
45 'State': {'Name': 'running'},
46 'InstanceType': 't2.micro',
47 'Tags': [{'Key': 'Name', 'Value': 'test-instance'}],
48 'LaunchTime': '2023-01-01T00:00:00Z'
49 }
50 ]
51
52 def create_instance(self, name, instance_type, ami_id, subnet_id, security_group_ids, key_name, wait=False):
53 return {
54 'InstanceId': 'i-1234',
55 'State': {'Name': 'running'},
56 'InstanceType': instance_type
57 }
58
59# Mock GitHub service for testing
60class MockGitHubService:

Callers 1

handle_ec2_commandFunction · 0.85

Calls

no outgoing calls

Tested by 1

handle_ec2_commandFunction · 0.68