Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
snf-ganeti
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
itminedu
snf-ganeti
Commits
caea3b32
Commit
caea3b32
authored
17 years ago
by
Iustin Pop
Browse files
Options
Downloads
Patches
Plain Diff
Implement QA tests for gnt-cluster rename
Reviewed-by: imsnah
parent
488b540d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
qa/ganeti-qa.py
+3
-0
3 additions, 0 deletions
qa/ganeti-qa.py
qa/qa-sample.yaml
+2
-0
2 additions, 0 deletions
qa/qa-sample.yaml
qa/qa_cluster.py
+31
-0
31 additions, 0 deletions
qa/qa_cluster.py
with
36 additions
and
0 deletions
qa/ganeti-qa.py
+
3
−
0
View file @
caea3b32
...
...
@@ -91,6 +91,9 @@ def RunClusterTests():
if
qa_config
.
TestEnabled
(
'
cluster-verify
'
):
RunTest
(
qa_cluster
.
TestClusterVerify
)
if
qa_config
.
TestEnabled
(
'
cluster-rename
'
):
RunTest
(
qa_cluster
.
TestClusterRename
)
if
qa_config
.
TestEnabled
(
'
cluster-info
'
):
RunTest
(
qa_cluster
.
TestClusterVersion
)
RunTest
(
qa_cluster
.
TestClusterInfo
)
...
...
This diff is collapsed.
Click to expand it.
qa/qa-sample.yaml
+
2
−
0
View file @
caea3b32
# Cluster name
name
:
xen-test
rename
:
xen-test-rename
hypervisor-type
:
xen-3.0
# System to use
...
...
@@ -36,6 +37,7 @@ tests:
cluster-copyfile
:
True
cluster-master-failover
:
True
cluster-destroy
:
True
cluster-rename
:
True
node-info
:
True
node-volumes
:
True
...
...
This diff is collapsed.
Click to expand it.
qa/qa_cluster.py
+
31
−
0
View file @
caea3b32
...
...
@@ -79,6 +79,37 @@ def TestClusterInit():
utils
.
ShellQuoteArgs
(
cmd
)).
wait
(),
0
)
@qa_utils.DefineHook
(
'
cluster-rename
'
)
def
TestClusterRename
():
"""
gnt-cluster rename
"""
master
=
qa_config
.
GetMasterNode
()
cmd
=
[
'
gnt-cluster
'
,
'
rename
'
,
'
-f
'
]
original_name
=
qa_config
.
get
(
'
name
'
)
rename_target
=
qa_config
.
get
(
'
rename
'
,
None
)
if
rename_target
is
None
:
print
qa_utils
.
FormatError
(
'"
rename
"
entry is missing
'
)
return
cmd_1
=
cmd
+
[
rename_target
]
cmd_2
=
cmd
+
[
original_name
]
cmd_verify
=
[
'
gnt-cluster
'
,
'
verify
'
]
AssertEqual
(
StartSSH
(
master
[
'
primary
'
],
utils
.
ShellQuoteArgs
(
cmd_1
)).
wait
(),
0
)
AssertEqual
(
StartSSH
(
master
[
'
primary
'
],
utils
.
ShellQuoteArgs
(
cmd_verify
)).
wait
(),
0
)
AssertEqual
(
StartSSH
(
master
[
'
primary
'
],
utils
.
ShellQuoteArgs
(
cmd_2
)).
wait
(),
0
)
AssertEqual
(
StartSSH
(
master
[
'
primary
'
],
utils
.
ShellQuoteArgs
(
cmd_verify
)).
wait
(),
0
)
@qa_utils.DefineHook
(
'
cluster-verify
'
)
def
TestClusterVerify
():
"""
gnt-cluster verify
"""
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment