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
1a483539
Commit
1a483539
authored
5 years ago
by
Jonathan Pastor
Browse files
Options
Downloads
Patches
Plain Diff
implement a spec test for non reservable GPUs
parent
00e67539
No related branches found
No related tags found
1 merge request
!6
WIP: Features/oar gpus
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
spec/oar_properties_spec.rb
+0
-43
0 additions, 43 deletions
spec/oar_properties_spec.rb
spec/stub_oar_properties/load_data_hierarchy_stubbed_data_with_non_reservable_gpus.json
+823
-0
823 additions, 0 deletions
...data_hierarchy_stubbed_data_with_non_reservable_gpus.json
with
823 additions
and
43 deletions
spec/oar_properties_spec.rb
+
0
−
43
View file @
1a483539
...
@@ -2112,47 +2112,4 @@ GeForce RTX 2080 Ti
...
@@ -2112,47 +2112,4 @@ GeForce RTX 2080 Ti
end
end
end
end
context
'interracting with a configured OAR server (misconfigured to test the "DIFF" action)'
do
before
do
prepare_stubs
(
"dump_oar_api_configured_server_to_test_diff.json"
,
"load_data_hierarchy_stubbed_data.json"
)
end
it
'should ignore the GPUs'
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_output
=
<<-
TXT
clustera-2:
["~", "eth_rate", 100, 10]
["~", "gpu_count", 2, 4]
TXT
expected_output2
=
<<-
TXT
# Error: Resource 4 (host=clustera-1.fakesite.grid5000.fr cpu=1 core=4 cpuset=2 gpu=2 gpudevice=1) has a mismatch for ressource CPUSET: API gives 2, generator wants 3.
# Error: Resource 4 (host=clustera-1.fakesite.grid5000.fr cpu=1 core=4 cpuset=2 gpu=2 gpudevice=1) has a mismatch for ressource GPU: API gives 2, generator wants 1.
# Error: Resource 4 (host=clustera-1.fakesite.grid5000.fr cpu=1 core=4 cpuset=2 gpu=2 gpudevice=1) has a mismatch for ressource GPUDEVICE: API gives 1, generator wants 0.
TXT
generator_output
=
capture
do
generate_oar_properties
(
options
)
end
expect
(
generator_output
[
:stdout
]).
to
include
(
expected_output
)
expect
(
generator_output
[
:stdout
]).
to
include
(
expected_output2
)
end
end
end
end
This diff is collapsed.
Click to expand it.
spec/stub_oar_properties/load_data_hierarchy_stubbed_data_with_non_reservable_gpus.json
0 → 100644
+
823
−
0
View file @
1a483539
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