Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenXG
OpenXG-RAN
Commits
5078fccc
Commit
5078fccc
authored
Nov 09, 2024
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CI test deployment.py: auto-pull missing images if necessary
parent
a3a59e4a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
1 deletion
+20
-1
ci-scripts/tests/README.md
ci-scripts/tests/README.md
+5
-1
ci-scripts/tests/deployment.py
ci-scripts/tests/deployment.py
+15
-0
No files found.
ci-scripts/tests/README.md
View file @
5078fccc
...
...
@@ -11,11 +11,15 @@ start with
python tests/iperf-analysis.py -v
python tests/ping-iperf.py -v
It will indicate if all tests passed. It assumes that these images are present:
It will indicate if all tests passed.
`tests/deployment.py`
requires these
images to be present:
-
`oai-ci/oai-nr-ue:develop-12345678`
-
`oai-ci/oai-gnb:develop-12345678`
It will try to download
`oaisoftwarealliance/oai-{gnb,nr-ue}:develop`
automatically and retag the images.
# test-runner test
This is not a true test, because the results need to be manually inspected. To
...
...
ci-scripts/tests/deployment.py
View file @
5078fccc
...
...
@@ -15,9 +15,24 @@ import cls_oai_html
import
cls_oaicitest
import
cls_containerize
import
ran
import
cls_cmd
class
TestDeploymentMethods
(
unittest
.
TestCase
):
def
_pull_image
(
self
,
cmd
,
image
):
ret
=
cmd
.
run
(
f"docker inspect oai-ci/
{
image
}
:develop-12345678"
)
if
ret
.
returncode
==
0
:
# exists
return
ret
=
cmd
.
run
(
f"docker pull oaisoftwarealliance/
{
image
}
:develop"
)
self
.
assertEqual
(
ret
.
returncode
,
0
)
ret
=
cmd
.
run
(
f"docker tag oaisoftwarealliance/
{
image
}
:develop oai-ci/
{
image
}
:develop-12345678"
)
self
.
assertEqual
(
ret
.
returncode
,
0
)
ret
=
cmd
.
run
(
f"docker rmi oaisoftwarealliance/
{
image
}
:develop"
)
self
.
assertEqual
(
ret
.
returncode
,
0
)
def
setUp
(
self
):
with
cls_cmd
.
getConnection
(
"localhost"
)
as
cmd
:
self
.
_pull_image
(
cmd
,
"oai-gnb"
)
self
.
_pull_image
(
cmd
,
"oai-nr-ue"
)
self
.
html
=
cls_oai_html
.
HTMLManagement
()
self
.
html
.
testCaseId
=
"000000"
self
.
ci
=
cls_oaicitest
.
OaiCiTest
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment