'When the cluster state includes one container that has a dataset with
a maximum size, the endpoint returns a single-element list
containing the container.
This is a regression test for a bug involving incorrect output in
this case that violated the JSON schema.'

def test_one_container_maximum_size(self):

    manifestation = Manifestation(dataset=Dataset(dataset_id=unicode(uuid4()), maximum_size=1234), primary=True)
    expected_application = Application(name=u'myapp', image=DockerImage.from_string(u'busybox:1.2'), volume=AttachedVolume(manifestation=manifestation, mountpoint=FilePath('/xxx/yyy')))
    expected_hostname = u'192.0.2.101'
    expected_uuid = uuid4()
    self.cluster_state_service.apply_changes([NodeState(hostname=expected_hostname, uuid=expected_uuid, applications={expected_application.name: expected_application}, manifestations={manifestation.dataset_id: manifestation}, devices={}, paths={})])
    expected_dict = dict(name=u'myapp', node_uuid=unicode(expected_uuid), image=u'busybox:1.2', running=True, restart_policy={u'name': u'never'}, volumes=[{'dataset_id': manifestation.dataset_id, 'mountpoint': u'/xxx/yyy'}])
    response = [expected_dict]
    return self.assertResult('GET', '/state/containers', None, OK, response)
