scheduler.test.node package

Submodules

scheduler.test.node.test_conditions module

class scheduler.test.node.test_conditions.TestNodeConditions(methodName='runTest')

Bases: django.test.testcases.TestCase

setUp()
test_generate_status_json(*args, **keywargs)

Tests calling generate_status_json() successfully

test_handle_cleanup_task_completed(*args, **keywargs)

Tests calling handle_cleanup_task_completed

scheduler.test.node.test_manager module

class scheduler.test.node.test_manager.TestNodeManager(methodName='runTest')

Bases: django.test.testcases.TestCase

setUp()
test_change_agent_id()

Tests the NodeManager where a registered node changes its agent ID

test_get_initial_cleanup_tasks()

Tests getting initial cleanup tasks from the manager

test_get_pull_tasks()

Tests getting Docker pull tasks from the manager

test_job_exe_clean_task()

Tests the NodeManager where a cleanup task is returned to clean up a job execution

test_job_exe_no_offers()

Tests the NodeManager where a node is running an exe and has not given offers to Scale in 1 hour. Expected behavior: The node is scheduler and DB are in sync and the node is still active

test_lost_known_node()

Tests the NodeManager where a known node was lost

test_lost_unknown_node()

Tests the NodeManager where an unknown node was lost

test_no_job_exe_no_offers()

Tests the NodeManager where a node is not running an exe and has not given offers to Scale in 1 hour. Expected behavior: The node is deleted and the DB model is update with is_active=False

test_no_job_exe_offers()

Tests the NodeManager where a node is not running an exe and gave Scale an offer 3 minutes ago. Expected behavior: The node is scheduler and DB are in sync and the node is still active

test_pull_task_change_agent_id()

Tests the NodeManager where a node’s agent ID changes during a pull task

test_successful_update()

Tests doing a successful database update

test_sync_and_remove_node_model()

Tests doing a successful database update when a node model should be removed from the scheduler

test_sync_node_model()

Tests doing a successful database update when a node model has been updated in the database

test_sync_with_renamed_node()

Tests doing a successful database update when a node model has its hostname changed in the database

scheduler.test.node.test_node_class module

class scheduler.test.node.test_node_class.TestNode(methodName='runTest')

Bases: django.test.testcases.TestCase

setUp()
test_generate_status_json(*args, **keywargs)

Tests calling generate_status_json() successfully

test_handle_failed_cleanup_task()

Tests handling failed cleanup task

test_handle_failed_health_task()

Tests handling failed health task

test_handle_failed_health_task_bad_daemon()

Tests handling a failed health task where the Docker daemon is bad

test_handle_failed_health_task_bad_logstash()

Tests handling a failed health task where Fluentd is unreachable

test_handle_failed_health_task_low_docker_space()

Tests handling a failed health task where Docker has low disk space

test_handle_failed_pull_task()

Tests handling failed Docker pull task

test_handle_initial_cleanup_task()

Tests handling the initial cleanup task

test_handle_killed_cleanup_task()

Tests handling killed cleanup task

test_handle_killed_health_task()

Tests handling killed health task

test_handle_killed_pull_task()

Tests handling killed cleanup task

test_handle_lost_cleanup_tasks()

Tests handling lost cleanup tasks

test_handle_lost_health_task()

Tests handling lost health task

test_handle_lost_pull_task()

Tests handling lost pull task

test_handle_regular_cleanup_task()

Tests handling a regular cleanup task

test_handle_successful_health_task()

Tests handling the health task successfully

test_handle_successful_pull_task()

Tests handling the Docker pull task successfully

test_node_that_is_not_cleaned_yet_no_pull_task()

Tests not returning pull task when the node hasn’t been cleaned up yet

test_paused_node_cleanup_task()

Tests not returning cleanup task when its node is paused

test_paused_node_pull_task()

Tests not returning pull task when its node is paused

Module contents