瀏覽代碼

HUE-674 [desktop] Add tests for dump_config stability

- Try to dump config with garbage string (shouldn't throw an error in dump_config).
abec 13 年之前
父節點
當前提交
2ec658e
共有 1 個文件被更改,包括 10 次插入0 次删除
  1. 10 0
      desktop/core/src/desktop/tests.py

+ 10 - 0
desktop/core/src/desktop/tests.py

@@ -117,6 +117,16 @@ def test_dump_config():
 
   clear()
 
+  # Malformed port per HUE-674
+  CANARY = "asdfoijaoidfjaosdjffjfjaoojosjfiojdosjoidjfoa"
+  clear = desktop.conf.HTTP_PORT.set_for_testing(CANARY)
+
+  response1 = c.get('/dump_config')
+  assert_true(CANARY in response1.content, response1.content)
+
+  clear()
+
+
 def test_prefs():
   c = make_logged_in_client()