Commit 712ab6a3 authored by Jérome Perrin's avatar Jérome Perrin Committed by Rafael Monnerat

subscription_request: produce stable json for easier testing

sorted and with the usual workaround for trailing space bug
parent 90f756ea
......@@ -35,6 +35,11 @@ for i in range(amount):
xml_parameter = """<?xml version="1.0" encoding="utf-8"?>
<instance>
<parameter id="_">%s</parameter>
</instance>""" % json.dumps(json_parameter, indent=2)
</instance>""" % json.dumps(json_parameter,
indent=2,
sort_keys=True,
# BBB PY2 https://github.com/python/cpython/issues/60537#issuecomment-1093598422
separators=(',', ': '),
)
return xml_parameter
......@@ -122,11 +122,11 @@ class TestSubscriptionCondition_renderKVMClusterParameter(TestSubscriptionSkinsM
"KVM0": {
"cpu-count": 40,
"cpu-max-count": 41,
"ram-size": 245760,
"ram-max-size": 245761,
"disable-ansible-promise": true,
"disk-device-path": "/dev/sdb",
"project-guid": "PROJ-XXXX",
"disable-ansible-promise": true
"ram-max-size": 245761,
"ram-size": 245760
}
}
}</parameter>
......@@ -144,13 +144,13 @@ class TestSubscriptionCondition_renderKVMClusterParameter(TestSubscriptionSkinsM
<parameter id="_">{
"kvm-partition-dict": {
"KVM0": {
"cpu-count": 40,
"cpu-max-count": 41,
"disable-ansible-promise": true,
"disk-device-path": "/dev/sdb",
"cpu-count": 40,
"project-guid": "PROJ-XXXX",
"ram-max-size": 245761,
"ram-size": 245760,
"project-guid": "PROJ-XXXX",
"cpu-max-count": 41,
"sticky-computer": true
}
}
......@@ -163,23 +163,23 @@ class TestSubscriptionCondition_renderKVMClusterParameter(TestSubscriptionSkinsM
<parameter id="_">{
"kvm-partition-dict": {
"KVM0": {
"cpu-count": 40,
"cpu-max-count": 41,
"disable-ansible-promise": true,
"disk-device-path": "/dev/sdb",
"cpu-count": 40,
"project-guid": "PROJ-XXXX",
"ram-max-size": 245761,
"ram-size": 245760,
"project-guid": "PROJ-XXXX",
"cpu-max-count": 41,
"sticky-computer": true
},
"KVM1": {
"disk-device-path": "/dev/sdb",
"cpu-count": 40,
"ram-max-size": 245761,
"cpu-max-count": 41,
"disable-ansible-promise": true,
"ram-size": 245760,
"project-guid": "PROJ-XXXX"
"disk-device-path": "/dev/sdb",
"project-guid": "PROJ-XXXX",
"ram-max-size": 245761,
"ram-size": 245760
}
}
}</parameter>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment