2022.6 #88

Merged
edraft merged 158 commits from 2022.6 into master 2022-06-29 17:50:07 +02:00
3 changed files with 14 additions and 10 deletions
Showing only changes of commit d83d1a244e - Show all commits

View File

@ -30,20 +30,20 @@ class CLITestSuite(unittest.TestSuite):
active_tests = [
# nothing needed
GenerateTestCase,
NewTestCase,
# GenerateTestCase,
# NewTestCase,
# compare console output
# VersionTestCase,
# project needed
BuildTestCase,
PublishTestCase,
RunTestCase,
# BuildTestCase,
# PublishTestCase,
# RunTestCase,
StartTestCase,
# check in project settings if package is updated
# UpdateTestCase,
# workspace needed
AddTestCase,
RemoveTestCase
# AddTestCase,
# RemoveTestCase
]
if self._is_online:

View File

@ -1,6 +1,7 @@
import json
import os
import shutil
import time
import unittest
from cpl_core.utils import String
@ -29,7 +30,7 @@ class StartTestCase(unittest.TestCase):
settings['RunTest']['WasRestarted'] = 'True'
settings['RunTest']['WasStarted'] = 'True'
with open('appsettings.json', 'w', encoding='utf-8') as project_file:
project_file.write(json.dumps(settings, indent=2))
project_file.close()
@ -68,7 +69,8 @@ class StartTestCase(unittest.TestCase):
def test_start(self):
thread = StartTestThread()
thread.run()
thread.start()
time.sleep(1)
settings = self._get_appsettings()
self.assertNotEqual(settings, {})
self.assertIn('RunTest', settings)
@ -82,6 +84,8 @@ class StartTestCase(unittest.TestCase):
file.write(f'# trigger restart (comment generated by unittest)')
file.close()
time.sleep(1)
settings = self._get_appsettings()
self.assertNotEqual(settings, {})
self.assertIn('RunTest', settings)

View File

@ -9,4 +9,4 @@ class StartTestThread(threading.Thread):
threading.Thread.__init__(self, daemon=True)
def run(self):
CLICommands.start()
CLICommands.start(True)