Commit 981d654c authored by Jérome Perrin's avatar Jérome Perrin

subscription_request: produce stable json for easier testing

sorted and with the usual workaround for trailing space bug
parent 70e171dd
Pipeline #33381 canceled with stage
in 0 seconds
...@@ -35,6 +35,11 @@ for i in range(amount): ...@@ -35,6 +35,11 @@ for i in range(amount):
xml_parameter = """<?xml version="1.0" encoding="utf-8"?> xml_parameter = """<?xml version="1.0" encoding="utf-8"?>
<instance> <instance>
<parameter id="_">%s</parameter> <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 return xml_parameter
...@@ -122,11 +122,11 @@ class TestSubscriptionCondition_renderKVMClusterParameter(TestSubscriptionSkinsM ...@@ -122,11 +122,11 @@ class TestSubscriptionCondition_renderKVMClusterParameter(TestSubscriptionSkinsM
"KVM0": { "KVM0": {
"cpu-count": 40, "cpu-count": 40,
"cpu-max-count": 41, "cpu-max-count": 41,
"ram-size": 245760, "disable-ansible-promise": true,
"ram-max-size": 245761,
"disk-device-path": "/dev/sdb", "disk-device-path": "/dev/sdb",
"project-guid": "PROJ-XXXX", "project-guid": "PROJ-XXXX",
"disable-ansible-promise": true "ram-max-size": 245761,
"ram-size": 245760
} }
} }
}</parameter> }</parameter>
...@@ -144,13 +144,13 @@ class TestSubscriptionCondition_renderKVMClusterParameter(TestSubscriptionSkinsM ...@@ -144,13 +144,13 @@ class TestSubscriptionCondition_renderKVMClusterParameter(TestSubscriptionSkinsM
<parameter id="_">{ <parameter id="_">{
"kvm-partition-dict": { "kvm-partition-dict": {
"KVM0": { "KVM0": {
"cpu-count": 40,
"cpu-max-count": 41,
"disable-ansible-promise": true, "disable-ansible-promise": true,
"disk-device-path": "/dev/sdb", "disk-device-path": "/dev/sdb",
"cpu-count": 40, "project-guid": "PROJ-XXXX",
"ram-max-size": 245761, "ram-max-size": 245761,
"ram-size": 245760, "ram-size": 245760,
"project-guid": "PROJ-XXXX",
"cpu-max-count": 41,
"sticky-computer": true "sticky-computer": true
} }
} }
...@@ -163,23 +163,23 @@ class TestSubscriptionCondition_renderKVMClusterParameter(TestSubscriptionSkinsM ...@@ -163,23 +163,23 @@ class TestSubscriptionCondition_renderKVMClusterParameter(TestSubscriptionSkinsM
<parameter id="_">{ <parameter id="_">{
"kvm-partition-dict": { "kvm-partition-dict": {
"KVM0": { "KVM0": {
"cpu-count": 40,
"cpu-max-count": 41,
"disable-ansible-promise": true, "disable-ansible-promise": true,
"disk-device-path": "/dev/sdb", "disk-device-path": "/dev/sdb",
"cpu-count": 40, "project-guid": "PROJ-XXXX",
"ram-max-size": 245761, "ram-max-size": 245761,
"ram-size": 245760, "ram-size": 245760,
"project-guid": "PROJ-XXXX",
"cpu-max-count": 41,
"sticky-computer": true "sticky-computer": true
}, },
"KVM1": { "KVM1": {
"disk-device-path": "/dev/sdb",
"cpu-count": 40, "cpu-count": 40,
"ram-max-size": 245761,
"cpu-max-count": 41, "cpu-max-count": 41,
"disable-ansible-promise": true, "disable-ansible-promise": true,
"ram-size": 245760, "disk-device-path": "/dev/sdb",
"project-guid": "PROJ-XXXX" "project-guid": "PROJ-XXXX",
"ram-max-size": 245761,
"ram-size": 245760
} }
} }
}</parameter> }</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