|
@@ -14,11 +14,11 @@
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
# See the License for the specific language governing permissions and
|
|
# See the License for the specific language governing permissions and
|
|
|
# limitations under the License.
|
|
# limitations under the License.
|
|
|
|
|
+
|
|
|
try:
|
|
try:
|
|
|
import json
|
|
import json
|
|
|
except ImportError:
|
|
except ImportError:
|
|
|
import simplejson as json
|
|
import simplejson as json
|
|
|
-import copy
|
|
|
|
|
import logging
|
|
import logging
|
|
|
import re
|
|
import re
|
|
|
|
|
|
|
@@ -32,6 +32,7 @@ from desktop.lib.test_utils import grant_access, add_permission
|
|
|
from jobsub.management.commands import jobsub_setup
|
|
from jobsub.management.commands import jobsub_setup
|
|
|
from jobsub.models import OozieDesign
|
|
from jobsub.models import OozieDesign
|
|
|
from liboozie import oozie_api
|
|
from liboozie import oozie_api
|
|
|
|
|
+from liboozie.conf import OOZIE_URL
|
|
|
from liboozie.oozie_api_test import OozieServerProvider
|
|
from liboozie.oozie_api_test import OozieServerProvider
|
|
|
from liboozie.types import WorkflowList, Workflow as OozieWorkflow, Coordinator as OozieCoordinator,\
|
|
from liboozie.types import WorkflowList, Workflow as OozieWorkflow, Coordinator as OozieCoordinator,\
|
|
|
CoordinatorList, WorkflowAction
|
|
CoordinatorList, WorkflowAction
|
|
@@ -1115,6 +1116,20 @@ class TestOozieSubmissions(OozieBase):
|
|
|
assert_equal('SUCCEEDED', job.status)
|
|
assert_equal('SUCCEEDED', job.status)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+class TestDashboardNoMocking:
|
|
|
|
|
+
|
|
|
|
|
+ def test_oozie_not_running_message(self):
|
|
|
|
|
+ c = make_logged_in_client(is_superuser=False)
|
|
|
|
|
+ grant_access("test", "test", "oozie")
|
|
|
|
|
+
|
|
|
|
|
+ finish = OOZIE_URL.set_for_testing('http://not_localhost:11000/bad')
|
|
|
|
|
+ try:
|
|
|
|
|
+ response = c.get(reverse('oozie:list_oozie_workflows'))
|
|
|
|
|
+ assert_true('The Oozie server is not running' in response.content, response.content)
|
|
|
|
|
+ finally:
|
|
|
|
|
+ finish()
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
class TestDashboard(OozieMockBase):
|
|
class TestDashboard(OozieMockBase):
|
|
|
|
|
|
|
|
def test_manage_workflow_dashboard(self):
|
|
def test_manage_workflow_dashboard(self):
|