Skip to content

Instantly share code, notes, and snippets.

@markmc
Created March 11, 2014 12:21
Show Gist options
  • Save markmc/9484531 to your computer and use it in GitHub Desktop.
Save markmc/9484531 to your computer and use it in GitHub Desktop.

Revisions

  1. markmc created this gist Mar 11, 2014.
    49 changes: 49 additions & 0 deletions gistfile1.diff
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,49 @@
    diff --git a/nova/tests/api/openstack/compute/test_servers.py b/nova/tests/api/openstack/compute/test_servers.py
    index 22dc9d4..7559896 100644
    --- a/nova/tests/api/openstack/compute/test_servers.py
    +++ b/nova/tests/api/openstack/compute/test_servers.py
    @@ -4308,7 +4308,7 @@ class ServerXMLSerializationTest(test.TestCase):
    def test_create(self):
    serializer = servers.FullServerTemplate()

    - self.body["server"]["adminPass"] = "test_password"
    + self.body["server"]["adminPass"] = u'\u89e3\u7801'

    output = serializer.serialize(self.body)
    root = etree.XML(output)
    diff --git a/nova/tests/integrated/api_samples/server-post-req.json.tpl b/nova/tests/integrated/api_samples/server-post-req.json.tpl
    index d3916d1..c7c1afd 100644
    --- a/nova/tests/integrated/api_samples/server-post-req.json.tpl
    +++ b/nova/tests/integrated/api_samples/server-post-req.json.tpl
    @@ -6,6 +6,7 @@
    "metadata" : {
    "My Server Name" : "Apache1"
    },
    + "adminPass" : "%(adminPass)s",
    "personality" : [
    {
    "path" : "/etc/banner.txt",
    diff --git a/nova/tests/integrated/api_samples/server-post-req.xml.tpl b/nova/tests/integrated/api_samples/server-post-req.xml.tpl
    index f926149..2c6f204 100644
    --- a/nova/tests/integrated/api_samples/server-post-req.xml.tpl
    +++ b/nova/tests/integrated/api_samples/server-post-req.xml.tpl
    @@ -3,6 +3,7 @@
    <metadata>
    <meta key="My Server Name">Apache1</meta>
    </metadata>
    + <adminPass>%(adminPass)s</adminPass>
    <personality>
    <file path="/etc/banner.txt">
    ICAgICAgDQoiQSBjbG91ZCBkb2VzIG5vdCBrbm93IHdoeSBp
    diff --git a/nova/tests/integrated/test_api_samples.py b/nova/tests/integrated/test_api_samples.py
    index fab6009..39cc3a5 100644
    --- a/nova/tests/integrated/test_api_samples.py
    +++ b/nova/tests/integrated/test_api_samples.py
    @@ -169,6 +169,7 @@ class ServersSampleBase(ApiSampleTestBaseV2):
    subs = {
    'image_id': fake.get_valid_image_id(),
    'host': self._get_host(),
    + 'adminPass': u'\u89e3\u7801',
    }
    response = self._do_post('servers', 'server-post-req', subs)
    subs = self._get_regexes()