Commit da042a79 authored by Jérome Perrin's avatar Jérome Perrin

plantuml/test: use slapos.testing

parent 7830efb5
...@@ -25,12 +25,11 @@ ...@@ -25,12 +25,11 @@
# #
############################################################################## ##############################################################################
from setuptools import setup, find_packages from setuptools import setup, find_packages
import glob
import os
version = '0.0.1.dev0' version = '0.0.1.dev0'
name = 'slapos.test.plantuml' name = 'slapos.test.plantuml'
long_description = open("README.md").read() with open("README.md") as f:
long_description = f.read()
setup(name=name, setup(name=name,
version=version, version=version,
......
...@@ -35,21 +35,13 @@ from PIL import Image ...@@ -35,21 +35,13 @@ from PIL import Image
import requests import requests
import plantuml import plantuml
import utils
from slapos.recipe.librecipe import generateHashFromFiles from slapos.recipe.librecipe import generateHashFromFiles
from slapos.testing.testcase import makeModuleSetUpAndTestCaseClass
# for development: debugging logs and install Ctrl+C handler
if os.environ.get('SLAPOS_TEST_DEBUG'):
import logging
logging.basicConfig(level=logging.DEBUG)
import unittest
unittest.installHandler()
setUpModule, PlantUMLTestCase = makeModuleSetUpAndTestCaseClass(
class PlantUMLTestCase(utils.SlapOSInstanceTestCase): os.path.abspath(
@classmethod os.path.join(os.path.dirname(__file__), '..', 'software.cfg')))
def getSoftwareURLList(cls):
return (os.path.abspath(os.path.join(os.path.dirname(__file__), '..', 'software.cfg')), )
class TestSimpleDiagram(PlantUMLTestCase): class TestSimpleDiagram(PlantUMLTestCase):
...@@ -165,8 +157,8 @@ class ServicesTestCase(PlantUMLTestCase): ...@@ -165,8 +157,8 @@ class ServicesTestCase(PlantUMLTestCase):
'tomcat-instance-{hash}-on-watch', 'tomcat-instance-{hash}-on-watch',
] ]
supervisor = self.getSupervisorRPCServer().supervisor with self.slap.instance_supervisor_rpc as supervisor:
process_names = [process['name'] process_names = [process['name']
for process in supervisor.getAllProcessInfo()] for process in supervisor.getAllProcessInfo()]
hash_files = [os.path.join(self.computer_partition_root_path, path) hash_files = [os.path.join(self.computer_partition_root_path, path)
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment