Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 45 additions & 3 deletions tests/docker_driver_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,50 @@
from dockerhostdriver import DockerHostDriver


class DescribeDockerHostDriver (TestCase):
class DockerApiService(object):

def test_it_can_be_initialized(self):
def get_address_information(self, container_id):
#some implementation of which APIs to call..:



class DescribeDockerHostDriverRefreshIP (TestCase):

def it_can_be_initialized(self):
driver = DockerHostDriver()
self.assertIsNotNone(driver, "Driver can't be none")
self.assertIsNotNone(driver, "Driver can't be none")


def it_gets_the_ip_from_the_container(self):

context=None
ports = ''

docker_api_service = DockerApiService()

driver = DockerHostDriver(docker_api_service)

#Given I have a docker host up with an IP of x
#When I refresh the IP
#The driver should poll the docker API for the IP


driver.remote_refresh_ip(context,ports)

docker_api_service.WasCalled("get_address_information")





def it_sets_the_updated_ip_on_the_cloudshell_resource(self):
pass

def it_gets_specific_port_information_for_each_protocol(self):
pass

def it_sets_the_specific_port_information_on_the_cloudshell_resource(self):
pass

def it_returns_an_intelligible_error_message_if_host_is_unreachable(self):
pass
1 change: 1 addition & 0 deletions tests/test_requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
requests-mock