Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
107
Merge Requests
107
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
slapos
Commits
9450bb34
Commit
9450bb34
authored
Nov 10, 2021
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kvm: Merge tests
parent
249df3be
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
21 deletions
+24
-21
software/kvm/test/test.py
software/kvm/test/test.py
+24
-21
No files found.
software/kvm/test/test.py
View file @
9450bb34
...
@@ -1179,27 +1179,6 @@ class TestBootImageUrlSelectKvmCluster(TestBootImageUrlListKvmCluster):
...
@@ -1179,27 +1179,6 @@ class TestBootImageUrlSelectKvmCluster(TestBootImageUrlListKvmCluster):
config_file_name
=
'boot-image-url-select.json'
config_file_name
=
'boot-image-url-select.json'
@
skipUnlessKvm
class
TestCpuMemMaxDynamic
(
InstanceTestCase
):
__partition_reference__
=
'cmm'
@
classmethod
def
getInstanceParameterDict
(
cls
):
return
{
'cpu-count'
:
2
,
'ram-size'
:
2048
}
def
test
(
self
):
with
open
(
os
.
path
.
join
(
self
.
computer_partition_root_path
,
'bin'
,
'kvm_raw'
),
'r'
)
as
fh
:
kvm_raw
=
fh
.
read
()
self
.
assertIn
(
'smp_count = 2'
,
kvm_raw
)
self
.
assertIn
(
'smp_max_count = 3'
,
kvm_raw
)
self
.
assertIn
(
'ram_size = 2048'
,
kvm_raw
)
self
.
assertIn
(
"ram_max_size = '2560'"
,
kvm_raw
)
@
skipUnlessKvm
@
skipUnlessKvm
class
TestNatRules
(
InstanceTestCase
):
class
TestNatRules
(
InstanceTestCase
):
__partition_reference__
=
'nr'
__partition_reference__
=
'nr'
...
@@ -1648,6 +1627,30 @@ class TestParameterDefault(InstanceTestCase, KvmMixin):
...
@@ -1648,6 +1627,30 @@ class TestParameterDefault(InstanceTestCase, KvmMixin):
def
test_network_adapter_set
(
self
):
def
test_network_adapter_set
(
self
):
self
.
_test
({
'network-adapter'
:
'e1000'
},
"network_adapter = 'e1000'"
)
self
.
_test
({
'network-adapter'
:
'e1000'
},
"network_adapter = 'e1000'"
)
def
test_cpu_count_default
(
self
):
self
.
_test
({},
"init_smp_count = 2"
)
def
test_cpu_count_default_max
(
self
):
self
.
_test
({},
"smp_max_count = 3"
)
def
test_cpu_count_set
(
self
):
self
.
_test
({
'cpu-count'
:
4
},
"init_smp_count = 4"
)
def
test_cpu_count_set_max
(
self
):
self
.
_test
({
'cpu-count'
:
4
},
"smp_max_count = 5"
)
def
test_ram_size_default
(
self
):
self
.
_test
({},
"init_ram_size = 4096"
)
def
test_ram_size_default_max
(
self
):
self
.
_test
({},
"ram_max_size = '4608'"
)
def
test_ram_size_set
(
self
):
self
.
_test
({
'ram-size'
:
2048
},
"init_ram_size = 2048"
)
def
test_ram_size_set_max
(
self
):
self
.
_test
({
'ram-size'
:
2048
},
"ram_max_size = '2560'"
)
@
skipUnlessKvm
@
skipUnlessKvm
class
TestParameterResilient
(
TestParameterDefault
):
class
TestParameterResilient
(
TestParameterDefault
):
...
...
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