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
104
Merge Requests
104
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
2f51f1a9
Commit
2f51f1a9
authored
Apr 03, 2024
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
software/kvm: Flake8ize test
parent
fd23a4f6
Pipeline
#33865
failed with stage
in 0 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
11 deletions
+21
-11
software/kvm/test/test.py
software/kvm/test/test.py
+21
-11
No files found.
software/kvm/test/test.py
View file @
2f51f1a9
...
...
@@ -234,10 +234,14 @@ class TestInstance(KVMTestCase, KvmMixin):
{
'ipv6'
:
self
.
computer_partition_ipv6_address
,
'maximum-extra-disk-amount'
:
'0'
,
'monitor-base-url'
:
f'https://[
{
self
.
computer_partition_ipv6_address
}
]:8026'
,
'nat-rule-port-tcp-22'
:
f'
{
self
.
computer_partition_ipv6_address
}
: 10022'
,
'nat-rule-port-tcp-443'
:
f'
{
self
.
computer_partition_ipv6_address
}
: 10443'
,
'nat-rule-port-tcp-80'
:
f'
{
self
.
computer_partition_ipv6_address
}
: 10080'
,
'monitor-base-url'
:
f'https://[
{
self
.
computer_partition_ipv6_address
}
]:8026'
,
'nat-rule-port-tcp-22'
:
f'
{
self
.
computer_partition_ipv6_address
}
: 10022'
,
'nat-rule-port-tcp-443'
:
f'
{
self
.
computer_partition_ipv6_address
}
: 10443'
,
'nat-rule-port-tcp-80'
:
f'
{
self
.
computer_partition_ipv6_address
}
: 10080'
,
}
)
self
.
assertEqual
(
set
(
present_key_list
),
set
(
assert_key_list
))
...
...
@@ -315,7 +319,7 @@ class TestMemoryManagement(KVMTestCase, KvmMixin):
self
.
computer_partition_root_path
,
'var'
,
'qmp_socket'
))
ram_mb
=
sum
(
q
[
'size'
]
for
q
in
qemu_wrapper
.
getMemoryInfo
()[
'hotplugged'
])
/
1024
/
1024
for
q
in
qemu_wrapper
.
getMemoryInfo
()[
'hotplugged'
])
/
1024
/
1024
cpu_count
=
len
(
[
q
[
'CPU'
]
for
q
in
qemu_wrapper
.
getCPUInfo
()[
'hotplugged'
]])
return
{
'cpu_count'
:
cpu_count
,
'ram_mb'
:
ram_mb
}
...
...
@@ -713,7 +717,8 @@ class TestInstanceResilient(KVMTestCase, KvmMixin):
connection_parameter_dict
,
{
'ipv6'
:
self
.
kvm0_ipv6
,
'monitor-base-url'
:
f'https://[
{
self
.
computer_partition_ipv6_address
}
]:8160'
,
'monitor-base-url'
:
f'https://[
{
self
.
computer_partition_ipv6_address
}
]:8160'
,
'monitor-user'
:
'admin'
,
'takeover-kvm-1-url'
:
f'http://[
{
self
.
kvm1_ipv6
}
]:9263/'
,
}
...
...
@@ -2212,7 +2217,8 @@ class TestExternalDiskModernCluster(TestExternalDiskModern):
return
'kvm-cluster'
def
getExternalDiskInstanceParameterDict
(
self
,
*
args
,
**
kwargs
):
partition_dict
=
super
().
getExternalDiskInstanceParameterDict
(
*
args
,
**
kwargs
)
partition_dict
=
super
().
getExternalDiskInstanceParameterDict
(
*
args
,
**
kwargs
)
partition_dict
.
update
({
"disable-ansible-promise"
:
True
})
return
{
"kvm-partition-dict"
:
{
...
...
@@ -2366,10 +2372,14 @@ vm""",
{
'ipv6'
:
self
.
computer_partition_ipv6_address
,
'maximum-extra-disk-amount'
:
'0'
,
'monitor-base-url'
:
f'https://[
{
self
.
computer_partition_ipv6_address
}
]:8026'
,
'nat-rule-port-tcp-22'
:
f'
{
self
.
computer_partition_ipv6_address
}
: 10022'
,
'nat-rule-port-tcp-443'
:
f'
{
self
.
computer_partition_ipv6_address
}
: 10443'
,
'nat-rule-port-tcp-80'
:
f'
{
self
.
computer_partition_ipv6_address
}
: 10080'
,
'monitor-base-url'
:
f'https://[
{
self
.
computer_partition_ipv6_address
}
]:8026'
,
'nat-rule-port-tcp-22'
:
f'
{
self
.
computer_partition_ipv6_address
}
: 10022'
,
'nat-rule-port-tcp-443'
:
f'
{
self
.
computer_partition_ipv6_address
}
: 10443'
,
'nat-rule-port-tcp-80'
:
f'
{
self
.
computer_partition_ipv6_address
}
: 10080'
,
}
)
self
.
assertEqual
(
set
(
present_key_list
),
set
(
assert_key_list
))
...
...
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