From ffccd9dcd9f6106def4113cc490e2a8e663c9037 Mon Sep 17 00:00:00 2001 From: Vitaly Gridnev Date: Mon, 6 Jun 2016 13:26:44 +0000 Subject: [PATCH] fix integration tests The reasons of failures are following: 1. The change [0] is introduced in horizon, which removes unneeded tags in production envs. This caused most failures. 2. HDP is removed from sahara codebase. 3. Sometimes unicode string 'None' is passed to saharaclient as input_id or output_id of job. This string was translated to NoneType. [0] https://review.openstack.org/#/c/287793 Co-Authored-by: Michael Ionkin Change-Id: I9cb0641b2b61a78a40b0e2c6faf2609f974088d2 --- sahara_dashboard/api/sahara.py | 4 ++++ sahara_dashboard/test/integration_tests/pages/mixins.py | 1 - tools/gate/integration/pre_test_hook.sh | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/sahara_dashboard/api/sahara.py b/sahara_dashboard/api/sahara.py index 83600101..5c95c66a 100644 --- a/sahara_dashboard/api/sahara.py +++ b/sahara_dashboard/api/sahara.py @@ -492,6 +492,10 @@ def job_get_configs(request, job_type): def job_execution_create(request, job_id, cluster_id, input_id, output_id, configs, interface, is_public=None, is_protected=None): + if input_id in [None, "", "None"]: + input_id = None + if output_id in [None, "", "None"]: + output_id = None return client(request).job_executions.create( job_id=job_id, cluster_id=cluster_id, diff --git a/sahara_dashboard/test/integration_tests/pages/mixins.py b/sahara_dashboard/test/integration_tests/pages/mixins.py index b88c2e8a..3ef223c5 100644 --- a/sahara_dashboard/test/integration_tests/pages/mixins.py +++ b/sahara_dashboard/test/integration_tests/pages/mixins.py @@ -19,7 +19,6 @@ class TableCreateWithPluginMixin(object): PLUGIN_CHOOSE_FORM_FIELDS = ( 'vanilla_version', 'cdh_version', - 'hdp_version', 'plugin_name', 'spark_version', 'fake_version', diff --git a/tools/gate/integration/pre_test_hook.sh b/tools/gate/integration/pre_test_hook.sh index a6ec06df..e744c727 100755 --- a/tools/gate/integration/pre_test_hook.sh +++ b/tools/gate/integration/pre_test_hook.sh @@ -4,3 +4,6 @@ set -ex source commons $@ + +cd /opt/stack/new/horizon/openstack_dashboard/local/local_settings.d +mv _20_integration_tests_scaffolds.py.example _20_integration_tests_scaffolds.py \ No newline at end of file