Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
workspaces
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ssa
workspaces
Commits
6862aef2
Commit
6862aef2
authored
3 years ago
by
Jim Sheckard
Browse files
Options
Downloads
Patches
Plain Diff
Ws 994: Sigh
parent
17d08f61
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!870
Ws 994: Sigh
Pipeline
#4748
passed
3 years ago
Stage: cache-build
Stage: build
Stage: unit-test
Stage: test-coverage
Stage: push
Stage: deploy-coverage-page
Stage: generate-yaml
Stage: trigger
Stage: deploy
Stage: e2e-test
Stage: .post
Pipeline: workspaces
#4750
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
apps/cli/executables/pexable/conveyor/conveyor/retrieve.py
+0
-12
0 additions, 12 deletions
apps/cli/executables/pexable/conveyor/conveyor/retrieve.py
apps/cli/executables/pexable/conveyor/test/test_conveyor.py
+0
-43
0 additions, 43 deletions
apps/cli/executables/pexable/conveyor/test/test_conveyor.py
with
0 additions
and
55 deletions
apps/cli/executables/pexable/conveyor/conveyor/retrieve.py
+
0
−
12
View file @
6862aef2
...
...
@@ -95,18 +95,6 @@ class RetrievalConveyor(ConveyorIF):
except
:
self
.
logger
.
warning
(
"
Unable to transmit QA notes to capability service
"
)
def
send_qa_fail_msg
(
self
,
sdm_id
:
str
)
->
Response
:
"""
Call REST endpoint that shoots off QA Fail message
:return:
"""
url
=
(
f
"
{
self
.
settings
[
'
workflow_url
'
]
}
/workflows/requests/
"
f
"
{
self
.
settings
[
'
request_id
'
]
}
/send-do-not-calibrate/
{
sdm_id
}
"
)
return
requests
.
post
(
url
,
json
=
{
"
sdm_id
"
:
sdm_id
})
def
break_symlinks
(
self
,
spool_path
:
Path
,
dir_list
:
List
[
str
]):
"""
Lose the symlinks we needed temporarily
...
...
This diff is collapsed.
Click to expand it.
apps/cli/executables/pexable/conveyor/test/test_conveyor.py
+
0
−
43
View file @
6862aef2
...
...
@@ -110,46 +110,3 @@ class TestConveyor:
# reset for other testing
args
.
retrieve
=
None
def
test_main_qa_fail
(
self
):
"""
Test the QA Fail REST endpoint
:return:
"""
args
.
qa_fail
=
[
TEST_JSON
]
args
.
fileSetIds
=
expected_settings
[
"
sdm_ids
"
]
try
:
with
patch
(
"
os.chdir
"
):
with
patch
(
PARSE_ARGS_PATCH
,
MagicMock
(
return_value
=
args
)):
with
patch
(
CONVEY_PATCH
)
as
mock_convey
:
con
.
main
()
assert
mock_convey
.
call_count
==
1
finally
:
# reset for other testing
args
.
qa_fail
=
None
args
.
fileSetIds
=
None
def
test_send_msg_url_is_valid
(
self
):
"""
Check that send_qa_fail_message posts a valid URL.
:return:
"""
settings
=
copy
.
copy
(
expected_settings
)
settings
[
"
request_id
"
]
=
-
1
r_con
=
RetrievalConveyor
(
settings
,
"
qa_fail
"
)
expected_url
=
(
f
"
{
settings
[
'
workflow_url
'
]
}
/workflows/requests/
{
settings
[
'
request_id
'
]
}
/
"
f
"
send-do-not-calibrate/
{
expected_settings
[
'
sdm_ids
'
]
}
"
)
expected_response
=
Response
(
status_code
=
HTTPStatus
.
OK
,
json_body
=
{
"
url
"
:
expected_url
})
http_conn
=
HTTPConnection
(
"
localhost
"
,
-
1
)
with
patch
(
"
requests.post
"
,
return_value
=
expected_response
):
with
patch
(
"
urllib3.connection.HTTPConnection.connect
"
,
return_value
=
http_conn
):
response
=
r_con
.
send_qa_fail_msg
(
expected_settings
[
"
sdm_ids
"
])
assert
response
.
status_code
==
expected_response
.
status_code
assert
response
.
body
==
expected_response
.
body
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