Commit 86b97532 authored by Gabriel Monnerat's avatar Gabriel Monnerat

Create a new workspace and remove everytime. THIS SHOULD NOT GO TO MASTER

parent f0ffc9da
......@@ -204,7 +204,7 @@ class SlaprunnerTestSuite(ResiliencyTestSuite):
try:
data = self._connectToSlaprunner(
resource='cloneRepository',
data='repo=https://lab.nexedi.com/gabriel/slapos.git&name=workspace/slapos&email=slapos@slapos.org&user=slapos'
data='repo=https://lab.nexedi.com/gabriel/slapos.git&name=workspace/gabriel&email=slapos@slapos.org&user=slapos'
)
data = json.loads(data)
if data['code'] == 0:
......@@ -213,14 +213,14 @@ class SlaprunnerTestSuite(ResiliencyTestSuite):
except (NotHttpOkException, urllib2.HTTPError):
# cloning can be very long.
# XXX: quite dirty way to check.
while self._connectToSlaprunner('getProjectStatus', data='project=workspace/slapos').find('On branch master') == -1:
while self._connectToSlaprunner('getProjectStatus', data='project=workspace/gabriel').find('On branch master') == -1:
self.logger.info('git-cloning ongoing, sleeping...')
def _openSoftwareRelease(self, software_release='erp5testnode/testsuite/dummy'):
self.logger.debug('Opening %s software release...' % software_release)
data = self._connectToSlaprunner(
resource='setCurrentProject',
data='path=workspace/slapos/software/%s/' % software_release
data='path=workspace/gabriel/software/%s/' % software_release
)
if json.loads(data)['code'] == 0:
self.logger.warning(data['result'])
......
......@@ -23,7 +23,7 @@ def cloneRepo(url, workDir, user="", email=""):
return jsonify(code=0,
result="Can not create project folder.")
if os.path.exists(workDir) and len(os.listdir(workDir)) < 2:
if os.path.exists(workDir):
shutil.rmtree(workDir) # delete useless files
repo = Repo.clone_from(url, workDir)
config_writer = repo.config_writer()
......
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