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
bff27b5d
Commit
bff27b5d
authored
5 years ago
by
Jonathan Pastor
Browse files
Options
Downloads
Patches
Plain Diff
implement a spec test for generator expecting no value
parent
da21c2bd
No related branches found
Branches containing commit
No related tags found
1 merge request
!6
WIP: Features/oar gpus
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
spec/oar_properties_spec.rb
+36
-0
36 additions, 0 deletions
spec/oar_properties_spec.rb
with
36 additions
and
0 deletions
spec/oar_properties_spec.rb
+
36
−
0
View file @
bff27b5d
...
@@ -2110,6 +2110,42 @@ GeForce RTX 2080 Ti
...
@@ -2110,6 +2110,42 @@ GeForce RTX 2080 Ti
expect
(
generator_output
[
:stdout
]).
to
include
(
expected_output
)
expect
(
generator_output
[
:stdout
]).
to
include
(
expected_output
)
expect
(
generator_output
[
:stdout
]).
not_to
include
(
not_expected_output
)
expect
(
generator_output
[
:stdout
]).
not_to
include
(
not_expected_output
)
end
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
# Error: Resource 1 (host=clustera-1.fakesite.grid5000.fr cpu=1 core=1 cpuset=0 gpu=1 gpudevice=0) has a mismatch for ressource GPU: OAR API gives 1, generator wants ø.
# Error: Resource 1 (host=clustera-1.fakesite.grid5000.fr cpu=1 core=1 cpuset=0 gpu=1 gpudevice=0) has a mismatch for ressource GPUDEVICE: OAR API gives 0, generator wants ø.
# Error: Resource 2 (host=clustera-1.fakesite.grid5000.fr cpu=1 core=2 cpuset=1 gpu=1 gpudevice=0) has a mismatch for ressource GPU: OAR API gives 1, generator wants ø.
TXT
not_expected_output
=
<<-
TXT
GeForce RTX 2080 Ti
TXT
generator_output
=
capture
do
generate_oar_properties
(
options
)
end
expect
(
generator_output
[
:stdout
]).
to
include
(
expected_output
)
expect
(
generator_output
[
:stdout
]).
not_to
include
(
not_expected_output
)
end
end
end
end
end
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