summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorDaniel Watkins <oddbloke@ubuntu.com>2020-03-13 15:49:42 -0400
committerGitHub <noreply@github.com>2020-03-13 15:49:42 -0400
commit1426a0d036a7f6707aac142a51f155f507d26739 (patch)
tree261c481c1e27df4b6f188ba3c62da735c2837a87 /templates
parent04647a3cb03bfaa29242cff02f3de9b0ac799f89 (diff)
downloadvyos-cloud-init-1426a0d036a7f6707aac142a51f155f507d26739.tar.gz
vyos-cloud-init-1426a0d036a7f6707aac142a51f155f507d26739.zip
cc_resolv_conf: introduce tests and stabilise output across Python versions (#251)
This is a follow-up to #144 which fixed the rendering behaviour. While writing the tests, CI failed due to dict iteration differences across Python versions, so this also sorts output so that we will produce the same output across Python versions.
Diffstat (limited to 'templates')
-rw-r--r--templates/resolv.conf.tmpl2
1 files changed, 1 insertions, 1 deletions
diff --git a/templates/resolv.conf.tmpl b/templates/resolv.conf.tmpl
index b6d46b4b..f870be67 100644
--- a/templates/resolv.conf.tmpl
+++ b/templates/resolv.conf.tmpl
@@ -32,7 +32,7 @@ options
{{flag-}}
{% endfor %}
-{%- for key, value in options.items() %}
+{%- for key, value in options.items()|sort %}
{{key}}:{{value-}}
{% endfor %}
{% endif %}