浏览代码

HUE-8846 [ci] Tag notebook test exporting data to a file as integration

Romain 6 年之前
父节点
当前提交
2d514ffd2e

+ 1 - 0
apps/hbase/src/hbase/tests.py

@@ -168,6 +168,7 @@ class MockProtocol():
 
 
 class TestIntegrationWithHBase:
+  integration = True
 
   @classmethod
   def setup_class(cls):

+ 1 - 0
desktop/libs/indexer/src/indexer/indexers/morphline_tests.py

@@ -20,6 +20,7 @@ import StringIO
 import logging
 
 from nose.tools import assert_equal, assert_true
+from nose.plugins.attrib import attr
 from nose.plugins.skip import SkipTest
 
 from django.contrib.auth.models import User

+ 13 - 11
desktop/libs/notebook/src/notebook/tests.py

@@ -19,6 +19,7 @@
 import json
 
 from collections import OrderedDict
+from nose.plugins.attrib import attr
 from nose.tools import assert_equal, assert_true, assert_false
 
 from django.contrib.auth.models import User
@@ -382,6 +383,7 @@ class TestNotebookApiMocked(object):
     originalCluster.FS_CACHE["default"] = self.original_fs
 
 
+  @attr('integration')
   def test_export_result(self):
     notebook_json = """
       {
@@ -429,17 +431,17 @@ class TestNotebookApiMocked(object):
     assert_equal('/user/hue/path.csv', data['watch_url']['destination'], data)
 
     if is_adls_enabled():
-        response = self.client.post(reverse('notebook:export_result'), {
-            'notebook': notebook_json,
-            'snippet': json.dumps(json.loads(notebook_json)['snippets'][0]),
-            'format': json.dumps('hdfs-file'),
-            'destination': json.dumps('adl:/user/hue/path.csv'),
-            'overwrite': json.dumps(False)
-        })
-
-        data = json.loads(response.content)
-        assert_equal(0, data['status'], data)
-        assert_equal('adl:/user/hue/path.csv', data['watch_url']['destination'], data)
+      response = self.client.post(reverse('notebook:export_result'), {
+          'notebook': notebook_json,
+          'snippet': json.dumps(json.loads(notebook_json)['snippets'][0]),
+          'format': json.dumps('hdfs-file'),
+          'destination': json.dumps('adl:/user/hue/path.csv'),
+          'overwrite': json.dumps(False)
+      })
+
+      data = json.loads(response.content)
+      assert_equal(0, data['status'], data)
+      assert_equal('adl:/user/hue/path.csv', data['watch_url']['destination'], data)
 
   def test_download_result(self):
     notebook_json = """