Skip to content
Permalink
Browse files

Merge pull request galaxyproject#8960 from jmchilton/package_tests_1

Move galaxy testing utilities into cleaner package structure.
  • Loading branch information
martenson committed Nov 12, 2019
2 parents a9f15ef + 45019c3 commit b5afa3c1a90d269f1d438ffde481ff2e4178a72b
Showing with 177 additions and 190 deletions.
  1. +1 −1 client/galaxy/scripts/mocha/tests/rules_dsl_spec.yml
  2. 0 {test/base → lib/galaxy_test}/__init__.py
  3. 0 lib/galaxy_test/base/__init__.py
  4. 0 {test → lib/galaxy_test}/base/api_asserts.py
  5. 0 {test → lib/galaxy_test}/base/api_util.py
  6. 0 {test → lib/galaxy_test}/base/constants.py
  7. 0 {test → lib/galaxy_test}/base/data/rules_dsl_spec.yml
  8. 0 {test → lib/galaxy_test}/base/data/test_workflow_1.ga
  9. 0 {test → lib/galaxy_test}/base/data/test_workflow_2.ga
  10. 0 {test → lib/galaxy_test}/base/data/test_workflow_batch.ga
  11. 0 {test → lib/galaxy_test}/base/data/test_workflow_map_reduce_pause.ga
  12. 0 {test → lib/galaxy_test}/base/data/test_workflow_matching_lists.ga
  13. 0 {test → lib/galaxy_test}/base/data/test_workflow_missing_tool.ga
  14. 0 {test → lib/galaxy_test}/base/data/test_workflow_pause.ga
  15. 0 {test → lib/galaxy_test}/base/data/test_workflow_topoambigouity.ga
  16. 0 {test → lib/galaxy_test}/base/data/test_workflow_topoambigouity_auto_laidout.ga
  17. 0 {test → lib/galaxy_test}/base/data/test_workflow_validation_1.ga
  18. 0 {test → lib/galaxy_test}/base/data/test_workflow_with_runtime_input.ga
  19. 0 {test → lib/galaxy_test}/base/instrument.py
  20. 0 {test → lib/galaxy_test}/base/interactor.py
  21. 0 {test → lib/galaxy_test}/base/nose_util.py
  22. 0 {test → lib/galaxy_test}/base/populators.py
  23. 0 {test → lib/galaxy_test}/base/rules_test_data.py
  24. 0 {test → lib/galaxy_test}/base/ssh_util.py
  25. 0 {test → lib/galaxy_test}/base/workflow_fixtures.py
  26. 0 lib/galaxy_test/driver/__init__.py
  27. +3 −3 {test/base → lib/galaxy_test/driver}/api.py
  28. +5 −5 {test/base → lib/galaxy_test/driver}/driver_util.py
  29. 0 {test/base → lib/galaxy_test/driver}/integration_util.py
  30. 0 {test/base → lib/galaxy_test/driver}/test_logging.py
  31. 0 {test/base → lib/galaxy_test/driver}/testcase.py
  32. +2 −2 scripts/functional_tests.py
  33. +1 −1 setup.cfg
  34. +1 −1 test/api/test_api_batch.py
  35. +1 −1 test/api/test_authenticate.py
  36. +3 −3 test/api/test_configuration.py
  37. +3 −2 test/api/test_dataset_collections.py
  38. +2 −2 test/api/test_datasets.py
  39. +1 −1 test/api/test_datatypes.py
  40. +1 −1 test/api/test_framework.py
  41. +1 −1 test/api/test_galaxy_interactor.py
  42. +2 −2 test/api/test_histories.py
  43. +2 −2 test/api/test_history_contents.py
  44. +2 −2 test/api/test_history_contents_provenance.py
  45. +3 −3 test/api/test_jobs.py
  46. +2 −2 test/api/test_libraries.py
  47. +3 −3 test/api/test_pages.py
  48. +3 −3 test/api/test_roles.py
  49. +3 −2 test/api/test_search.py
  50. +1 −1 test/api/test_tool_data.py
  51. +6 −5 test/api/test_tools.py
  52. +4 −5 test/api/test_tools_upload.py
  53. +1 −1 test/api/test_tours.py
  54. +2 −2 test/api/test_users.py
  55. +2 −2 test/api/test_visualizations.py
  56. +1 −4 test/api/test_webhooks.py
  57. +1 −2 test/api/test_workflow_extraction.py
  58. +5 −5 test/api/test_workflows.py
  59. +2 −3 test/api/test_workflows_from_yaml.py
  60. +5 −5 test/functional/test_toolbox.py
  61. +2 −1 test/functional/test_toolbox_pytest.py
  62. +2 −2 test/integration/objectstore/test_jobs.py
  63. +2 −2 test/integration/objectstore/test_selection.py
  64. +1 −2 test/integration/test_chained_dynamic_destinations.py
  65. +4 −4 test/integration/test_cli_runners.py
  66. +1 −1 test/integration/test_config_defaults.py
  67. +1 −1 test/integration/test_config_options_users.py
  68. +3 −4 test/integration/test_containerized_jobs.py
  69. +2 −2 test/integration/test_data_manager.py
  70. +2 −2 test/integration/test_datatype_upload.py
  71. +2 −2 test/integration/test_fail_job_tool_unavailable.py
  72. +1 −1 test/integration/test_handler_assignment_methods.py
  73. +3 −3 test/integration/test_interactivetools_api.py
  74. +2 −2 test/integration/test_job_environments.py
  75. +2 −2 test/integration/test_job_recovery.py
  76. +1 −1 test/integration/test_job_resubmission.py
  77. +4 −4 test/integration/test_kubernetes_runner.py
  78. +4 −4 test/integration/test_kubernetes_staging.py
  79. +2 −2 test/integration/test_local_job_cancellation.py
  80. +2 −2 test/integration/test_mules_as_job_handlers.py
  81. +4 −4 test/integration/test_page_revision_json_encoding.py
  82. +1 −1 test/integration/test_pulsar_embedded.py
  83. +3 −3 test/integration/test_pulsar_embedded_containers.py
  84. +1 −1 test/integration/test_pulsar_embedded_copy_working.py
  85. +1 −1 test/integration/test_pulsar_embedded_metadata.py
  86. +2 −2 test/integration/test_resolvers.py
  87. +2 −2 test/integration/test_scripts.py
  88. +2 −3 test/integration/test_shed_tool_tests.py
  89. +4 −4 test/integration/test_upload_configuration_options.py
  90. +2 −2 test/integration/test_work_queue_put_failure.py
  91. +2 −2 test/integration/test_workflow_handler_configuration.py
  92. +2 −2 test/integration/test_workflow_scheduling_options.py
  93. +3 −3 test/integration/test_workflow_sync.py
  94. +2 −2 test/integration/uses_shed.py
  95. +1 −1 test/manual/gen_history_export_test_artifacts.py
  96. +1 −1 test/manual/workflows_scaling.py
  97. +7 −7 test/selenium_tests/framework.py
  98. +2 −3 test/selenium_tests/test_history_panel_collections.py
  99. +1 −2 test/selenium_tests/test_history_panel_pagination.py
  100. +1 −2 test/selenium_tests/test_jupyter.py
  101. +2 −3 test/selenium_tests/test_tool_form.py
  102. +1 −2 test/selenium_tests/test_workflow_editor.py
  103. +1 −2 test/selenium_tests/test_workflow_management.py
  104. +4 −4 test/selenium_tests/test_workflow_run.py
  105. +1 −1 test/shed_functional/base/test_db_util.py
  106. +3 −3 test/shed_functional/base/twilltestcase.py
  107. +1 −2 test/shed_functional/functional_tests.py
  108. +1 −2 test/unit/test_remote_shell.py
  109. +1 −1 test/unit/test_rule_utils.py
File renamed without changes.
No changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
No changes.
@@ -3,21 +3,21 @@

from six.moves.urllib.parse import urlencode

from .api_asserts import (
from galaxy_test.base.api_asserts import (
assert_error_code_is,
assert_has_keys,
assert_not_has_keys,
assert_status_code_is,
assert_status_code_is_ok,
)
from .api_util import (
from galaxy_test.base.api_util import (
ADMIN_TEST_USER,
get_master_api_key,
get_user_api_key,
OTHER_USER,
TEST_USER,
)
from .interactor import TestCaseGalaxyInteractor as BaseInteractor
from galaxy_test.base.interactor import TestCaseGalaxyInteractor as BaseInteractor
from .testcase import FunctionalTestCase


@@ -36,16 +36,16 @@
from galaxy.model import mapping
from galaxy.model.tool_shed_install import mapping as toolshed_mapping
from galaxy.tool_util.verify.interactor import GalaxyInteractorApi, verify_tool
from galaxy.util import asbool, download_to_file
from galaxy.util import asbool, download_to_file, galaxy_directory
from galaxy.util.properties import load_app_properties
from galaxy.web import buildapp
from galaxy_test.base.api_util import get_master_api_key, get_user_api_key
from galaxy_test.base.instrument import StructuredTestDataPlugin
from galaxy_test.base.nose_util import run
from tool_shed.webapp.app import UniverseApplication as ToolshedUniverseApplication
from .api_util import get_master_api_key, get_user_api_key
from .instrument import StructuredTestDataPlugin
from .nose_util import run
from .test_logging import logging_config_file

galaxy_root = os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir, os.path.pardir))
galaxy_root = galaxy_directory()
DEFAULT_WEB_HOST = socket.gethostbyname('localhost')
DEFAULT_CONFIG_PREFIX = "GALAXY"
GALAXY_TEST_DIRECTORY = os.path.join(galaxy_root, "test")
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -12,8 +12,8 @@
galaxy_root = os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir))
sys.path[1:1] = [os.path.join(galaxy_root, "lib"), os.path.join(galaxy_root, "test")]

from base import driver_util
from base.api_util import get_master_api_key, get_user_api_key
from galaxy_test.base.api_util import get_master_api_key, get_user_api_key
from galaxy_test.driver import driver_util

log = driver_util.build_logger()

@@ -15,4 +15,4 @@ exclude = lib/galaxy/util/jstree.py
# For flake8-import-order
# https://github.com/PyCQA/flake8-import-order/blob/master/tests/test_cases/complete_smarkets.py
import-order-style = smarkets
application-import-names = galaxy,tool_shed
application-import-names = galaxy,galaxy_test,tool_shed
@@ -2,7 +2,7 @@

from requests import post

from base import api # noqa: I100,I202
from galaxy_test.driver import api


class ApiBatchTestCase(api.ApiTestCase):
@@ -2,7 +2,7 @@

from requests import get

from base import api # noqa: I100,I202
from galaxy_test.driver import api

TEST_USER_EMAIL = "auth_user_test@bx.psu.edu"
TEST_USER_PASSWORD = "testpassword1"
@@ -1,11 +1,11 @@
from base import api
from base.api_asserts import (
from galaxy_test.base.api_asserts import (
assert_has_keys,
assert_not_has_keys,
)
from base.populators import (
from galaxy_test.base.populators import (
LibraryPopulator
)
from galaxy_test.driver import api

TEST_KEYS_FOR_ALL_USERS = [
'enable_unique_workflow_defaults',
@@ -1,10 +1,11 @@
import json
import tarfile

from base import api
from base.populators import DatasetCollectionPopulator, DatasetPopulator, skip_if_github_down
from six import BytesIO

from galaxy_test.base.populators import DatasetCollectionPopulator, DatasetPopulator, skip_if_github_down
from galaxy_test.driver import api


class DatasetCollectionApiTestCase(api.ApiTestCase):

@@ -2,11 +2,11 @@

import textwrap

from base import api
from base.populators import (
from galaxy_test.base.populators import (
DatasetCollectionPopulator,
DatasetPopulator,
)
from galaxy_test.driver import api


class DatasetsApiTestCase(api.ApiTestCase):
@@ -2,7 +2,7 @@

from requests import put

from base import api # noqa: I100,I202
from galaxy_test.driver import api

HIDDEN_DURING_UPLOAD_DATATYPE = "fli"

@@ -1,6 +1,6 @@
# This file doesn't test any API in particular but is meant to functionally
# test the API framework itself.
from base import api
from galaxy_test.driver import api


class ApiFrameworkTestCase(api.ApiTestCase):
@@ -2,7 +2,7 @@

from packaging.version import Version

from base import api # noqa: I100,I202
from galaxy_test.driver import api


class GalaxyInteractorBackwardCompatTestCase(api.ApiTestCase):
@@ -6,11 +6,11 @@
put
)

from base import api # noqa: I100,I202
from base.populators import ( # noqa: I100
from galaxy_test.base.populators import (
DatasetCollectionPopulator,
DatasetPopulator,
)
from galaxy_test.driver import api


class HistoriesApiTestCase(api.ApiTestCase):
@@ -4,14 +4,14 @@

from requests import delete, put

from base import api # noqa: I100,I202
from base.populators import ( # noqa: I100
from galaxy_test.base.populators import (
DatasetCollectionPopulator,
DatasetPopulator,
LibraryPopulator,
skip_without_tool,
TestsDatasets,
)
from galaxy_test.driver import api


# TODO: Test anonymous access.
@@ -1,5 +1,5 @@
from base import api
from base.populators import DatasetPopulator
from galaxy_test.base.populators import DatasetPopulator
from galaxy_test.driver import api


class TestProvenance(api.ApiTestCase):
@@ -6,16 +6,16 @@

import requests

from base import api # noqa: I100,I202
from base.api_asserts import assert_status_code_is_ok # noqa: I100
from base.populators import ( # noqa: I100
from galaxy_test.base.api_asserts import assert_status_code_is_ok
from galaxy_test.base.populators import (
DatasetCollectionPopulator,
DatasetPopulator,
skip_without_tool,
uses_test_history,
wait_on,
wait_on_state,
)
from galaxy_test.driver import api


class JobsApiTestCase(api.ApiTestCase):
@@ -2,13 +2,13 @@
import time
import unittest

from base import api
from base.populators import (
from galaxy_test.base.populators import (
DatasetCollectionPopulator,
DatasetPopulator,
LibraryPopulator,
TestsDatasets,
)
from galaxy_test.driver import api

FILE_URL = 'https://raw.githubusercontent.com/galaxyproject/galaxy/dev/test-data/4.bed'
FILE_MD5 = "37b59762b59fff860460522d271bc111"
@@ -1,8 +1,8 @@
from requests import delete

from base import api # noqa: I100,I202
from base.populators import DatasetPopulator
from galaxy.exceptions import error_codes # noqa: I201
from galaxy.exceptions import error_codes
from galaxy_test.base.populators import DatasetPopulator
from galaxy_test.driver import api


class BasePageApiTestCase(api.ApiTestCase):
@@ -1,13 +1,13 @@
import json

from base import api
from base.api_asserts import (
from galaxy_test.base.api_asserts import (
assert_has_keys,
assert_status_code_is,
)
from base.populators import ( # noqa: I100
from galaxy_test.base.populators import (
DatasetPopulator,
)
from galaxy_test.driver import api


class RolesApiTestCase(api.ApiTestCase):
@@ -1,7 +1,8 @@
from base import api
from base.populators import WorkflowPopulator
from requests import delete

from galaxy_test.base.populators import WorkflowPopulator
from galaxy_test.driver import api


class SearchApiTestCase(api.ApiTestCase):

@@ -4,7 +4,7 @@

import operator

from base import api
from galaxy_test.driver import api


class ToolDataApiTestCase(api.ApiTestCase):
@@ -5,18 +5,19 @@
import tarfile

import pytest
from base import api
from base import rules_test_data
from base.populators import (
from requests import get
from six import BytesIO

from galaxy_test.base import rules_test_data
from galaxy_test.base.populators import (
DatasetCollectionPopulator,
DatasetPopulator,
LibraryPopulator,
load_data_dict,
skip_without_tool,
uses_test_history,
)
from requests import get
from six import BytesIO
from galaxy_test.driver import api


MINIMAL_TOOL = {
@@ -1,19 +1,18 @@
import json

from base import api
from base.constants import (
from galaxy.tool_util.verify.test_data import TestDataResolver
from galaxy_test.base.constants import (
ONE_TO_SIX_ON_WINDOWS,
ONE_TO_SIX_WITH_SPACES,
ONE_TO_SIX_WITH_TABS,
)
from base.populators import (
from galaxy_test.base.populators import (
DatasetPopulator,
skip_if_site_down,
skip_without_datatype,
uses_test_history,
)

from galaxy.tool_util.verify.test_data import TestDataResolver
from galaxy_test.driver import api


class ToolsUploadTestCase(api.ApiTestCase):
@@ -1,4 +1,4 @@
from base import api
from galaxy_test.driver import api


class TourApiTestCase(api.ApiTestCase):
@@ -6,8 +6,8 @@
put
)

from base import api # noqa: I100,I202
from base.populators import skip_without_tool
from galaxy_test.base.populators import skip_without_tool
from galaxy_test.driver import api

TEST_USER_EMAIL = "user_for_users_index_test@bx.psu.edu"
TEST_USER_EMAIL_DELETE = "user_for_delete_test@bx.psu.edu"
@@ -5,8 +5,8 @@
put
)

from base import api # noqa: I100,I202
from base.api_asserts import assert_has_keys # noqa: I100
from galaxy_test.base.api_asserts import assert_has_keys
from galaxy_test.driver import api

INDEX_KEYS = [
'id', 'title', 'type', 'dbkey', 'url'
@@ -1,13 +1,10 @@
from base import api
from base.driver_util import TEST_WEBHOOKS_DIR
from galaxy.webhooks import WebhooksRegistry # noqa: I201
from galaxy_test.driver import api


class WebhooksApiTestCase(api.ApiTestCase):

def setUp(self):
super(WebhooksApiTestCase, self).setUp()
self.webhooks_registry = WebhooksRegistry(TEST_WEBHOOKS_DIR)

def test_get_all(self):
response = self._get('webhooks')
@@ -5,8 +5,7 @@
from collections import namedtuple
from json import dumps, loads

from base.populators import skip_without_tool, summarize_instance_history_on_error

from galaxy_test.base.populators import skip_without_tool, summarize_instance_history_on_error
from .test_workflows import BaseWorkflowsApiTestCase


0 comments on commit b5afa3c

Please sign in to comment.
You can’t perform that action at this time.