From a80a970b1d229439d70abe9b0b23b79c4b545ec4 Mon Sep 17 00:00:00 2001 From: salimfadhley Date: Sun, 23 Jun 2013 08:57:54 +0100 Subject: [PATCH] small re-organization, now we have a config file for all the jobs used in systests --- jenkinsapi_tests/systests/test_queue.py | 30 +++--------------------------- 1 file changed, 3 insertions(+), 27 deletions(-) diff --git a/jenkinsapi_tests/systests/test_queue.py b/jenkinsapi_tests/systests/test_queue.py index 0e8080e..8bf0e7f 100644 --- a/jenkinsapi_tests/systests/test_queue.py +++ b/jenkinsapi_tests/systests/test_queue.py @@ -5,36 +5,12 @@ import time import logging import unittest from jenkinsapi.queue import Queue -from jenkinsapi.exceptions import NoBuildData from jenkinsapi_tests.systests.base import BaseSystemTest from jenkinsapi_tests.test_utils.random_strings import random_string +from jenkinsapi_tests.systests.job_configs import LONG_RUNNING_JOB log = logging.getLogger(__name__) -JOB_XML = """ - - - - - false - - - true - false - false - false - - false - - - ping -c 200 localhost - - - - -""".strip() - - class TestQueue(BaseSystemTest): """ All kinds of testing on Jenkins Queues @@ -49,7 +25,7 @@ class TestQueue(BaseSystemTest): jobs = [] for job_name in job_names: - j = self.jenkins.create_job(job_name, JOB_XML) + j = self.jenkins.create_job(job_name, LONG_RUNNING_JOB) jobs.append(j) j.invoke() @@ -61,7 +37,7 @@ class TestQueue(BaseSystemTest): def test_start_and_stop_long_running_job(self): job_name = random_string() - j = self.jenkins.create_job(job_name, JOB_XML) + j = self.jenkins.create_job(job_name, LONG_RUNNING_JOB) j.invoke() self.assertTrue(j.is_queued_or_running()) -- 2.7.4