Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Carlos Ramos Carreño
slapos.core
Commits
2d608b65
Commit
2d608b65
authored
Apr 25, 2013
by
Marco Mariani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed a test, import unittest2
parent
7bb8ee26
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
12 deletions
+12
-12
slapos/tests/slapgrid.py
slapos/tests/slapgrid.py
+12
-12
No files found.
slapos/tests/slapgrid.py
View file @
2d608b65
...
...
@@ -36,7 +36,7 @@ import sys
import
tempfile
import
textwrap
import
time
import
unittest
import
unittest
2
import
urlparse
import
xml_marshaller
...
...
@@ -147,7 +147,7 @@ class BasicMixin:
shutil
.
rmtree
(
self
.
_tempdir
,
True
)
class
TestBasicSlapgridCP
(
BasicMixin
,
unittest
.
TestCase
):
class
TestBasicSlapgridCP
(
BasicMixin
,
unittest
2
.
TestCase
):
def
test_no_software_root
(
self
):
self
.
assertRaises
(
OSError
,
self
.
grid
.
processComputerPartitionList
)
...
...
@@ -446,7 +446,7 @@ touch worked"""):
class
TestSlapgridCPWithMaster
(
MasterMixin
,
unittest
.
TestCase
):
class
TestSlapgridCPWithMaster
(
MasterMixin
,
unittest
2
.
TestCase
):
def
test_nothing_to_do
(
self
):
...
...
@@ -740,7 +740,7 @@ exit 1
self
.
assertEqual
(
'stopped'
,
instance
.
state
)
class
TestSlapgridCPWithMasterWatchdog
(
MasterMixin
,
unittest
.
TestCase
):
class
TestSlapgridCPWithMasterWatchdog
(
MasterMixin
,
unittest
2
.
TestCase
):
def
setUp
(
self
):
MasterMixin
.
setUp
(
self
)
...
...
@@ -915,7 +915,7 @@ class TestSlapgridCPWithMasterWatchdog(MasterMixin, unittest.TestCase):
self
.
assertEqual
(
computer
.
sequence
,[])
class
TestSlapgridCPPartitionProcessing
(
MasterMixin
,
unittest
.
TestCase
):
class
TestSlapgridCPPartitionProcessing
(
MasterMixin
,
unittest
2
.
TestCase
):
def
test_partition_timestamp
(
self
):
computer
=
ComputerForTest
(
self
.
software_root
,
self
.
instance_root
)
...
...
@@ -1302,7 +1302,7 @@ echo %s; echo %s; exit 42""" % (line1, line2))
self
.
assertTrue
(
"Failed to run buildout"
in
instance
.
error_log
)
class
TestSlapgridUsageReport
(
MasterMixin
,
unittest
.
TestCase
):
class
TestSlapgridUsageReport
(
MasterMixin
,
unittest
2
.
TestCase
):
"""
Test suite about slapgrid-ur
"""
...
...
@@ -1504,7 +1504,7 @@ class TestSlapgridUsageReport(MasterMixin, unittest.TestCase):
class
TestSlapgridSoftwareRelease
(
MasterMixin
,
unittest
.
TestCase
):
class
TestSlapgridSoftwareRelease
(
MasterMixin
,
unittest
2
.
TestCase
):
def
test_one_software_buildout_fail_is_correctly_logged
(
self
):
"""
1. We set up a software using a corrupted buildout
...
...
@@ -1525,7 +1525,7 @@ echo %s; echo %s; exit 42""" % (line1, line2))
self
.
assertTrue
(
line2
in
software
.
error_log
)
self
.
assertTrue
(
"Failed to run buildout"
in
software
.
error_log
)
class
SlapgridInitialization
(
unittest
.
TestCase
):
class
SlapgridInitialization
(
unittest
2
.
TestCase
):
"""
"Abstract" class setting setup and teardown for TestSlapgridArgumentTuple
and TestSlapgridConfigurationFile.
...
...
@@ -1596,9 +1596,9 @@ class TestSlapgridArgumentTuple(SlapgridInitialization):
parser
=
slapgrid
.
parseArgumentTupleAndReturnSlapgridObject
argument_tuple
=
(
"--signature_private_key_file"
,
"/non/exists/path"
)
+
\
self
.
default_arg_tuple
# XXX: SystemExit is too generic exception, it is only known that
# something is wrong
self
.
assertRaises
(
SystemExit
,
parser
,
*
argument_tuple
)
self
.
assertRaisesRegexp
(
RuntimeError
,
"File '/non/exists/path' does not exist."
,
parser
,
*
argument_tuple
)
def
test_signature_private_key_file
(
self
):
"""
...
...
@@ -1771,7 +1771,7 @@ binary-cache-url-blacklist =
)
class
TestSlapgridCPWithMasterPromise
(
MasterMixin
,
unittest
.
TestCase
):
class
TestSlapgridCPWithMasterPromise
(
MasterMixin
,
unittest
2
.
TestCase
):
def
test_one_failing_promise
(
self
):
computer
=
ComputerForTest
(
self
.
software_root
,
self
.
instance_root
)
instance
=
computer
.
instance_list
[
0
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment