Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
reference-repository
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
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
grid5000
reference-repository
Commits
85d215d5
Commit
85d215d5
authored
4 years ago
by
Pierre Neyron
Browse files
Options
Downloads
Patches
Plain Diff
[spec] add test in oar_properties for unset chassis properties
parent
8dcb94f0
No related branches found
No related tags found
1 merge request
!103
11903 set the chassis property
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
spec/oar_properties_spec.rb
+40
-0
40 additions, 0 deletions
spec/oar_properties_spec.rb
spec/stub_oar_properties/dump_oar_api_configured_server_but_chassis_unset.json
+2478
-0
2478 additions, 0 deletions
...ies/dump_oar_api_configured_server_but_chassis_unset.json
with
2518 additions
and
0 deletions
spec/oar_properties_spec.rb
+
40
−
0
View file @
85d215d5
...
@@ -2564,4 +2564,44 @@ echo; echo 'Adding disk sdb.clusterb-2 on host clusterb-1.fakesite.grid5000.fr:'
...
@@ -2564,4 +2564,44 @@ echo; echo 'Adding disk sdb.clusterb-2 on host clusterb-1.fakesite.grid5000.fr:'
end
end
end
end
context
'OAR server with data but chassis is unset'
do
before
do
prepare_stubs
(
"dump_oar_api_configured_server_but_chassis_unset.json"
,
"load_data_hierarchy_stubbed_data.json"
)
end
it
'should generate correctly a diff with the OAR server'
do
uri
=
URI
(
conf
[
"uri"
])
response
=
Net
::
HTTP
.
get
(
uri
)
expect
(
response
).
to
be_an_instance_of
(
String
)
options
=
{
:table
=>
false
,
:print
=>
false
,
:update
=>
false
,
:diff
=>
true
,
:site
=>
"fakesite"
,
:clusters
=>
[
"clustera"
],
:verbose
=>
2
}
expected_clustera1_diff
=
<<-
TXT
clustera-1:
["~", "chassis", nil, "Dell Inc. PowerEdge T640 FL1CBX2"]
TXT
expected_clustera2_diff
=
<<-
TXT
clustera-2:
["~", "chassis", nil, "Dell Inc. PowerEdge T640 9L1CBX2"]
TXT
generator_output
=
capture
do
generate_oar_properties
(
options
)
end
expect
(
generator_output
[
:stdout
]).
to
include
(
expected_clustera1_diff
)
expect
(
generator_output
[
:stdout
]).
to
include
(
expected_clustera2_diff
)
end
end
end
end
This diff is collapsed.
Click to expand it.
spec/stub_oar_properties/dump_oar_api_configured_server_but_chassis_unset.json
0 → 100644
+
2478
−
0
View file @
85d215d5
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