Просмотр исходного кода

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 лет назад
Родитель
Сommit
2ec658ec96
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()