Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
Pulsar
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
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
Code review analytics
Issue 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
NDIP
Pulsar
Commits
87bd6722
Commit
87bd6722
authored
2 years ago
by
John Chilton
Browse files
Options
Downloads
Patches
Plain Diff
More typing of integration testing code.
parent
137e3dc4
No related branches found
No related tags found
3 merge requests
!44
Try to fix CI.
,
!38
Generalize orchestrated container scheduling.
,
!22
update Pulsar to 0.15.3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/integration_test.py
+12
-5
12 additions, 5 deletions
test/integration_test.py
with
12 additions
and
5 deletions
test/integration_test.py
+
12
−
5
View file @
87bd6722
import
configparser
import
configparser
from
os
import
environ
,
makedirs
,
system
from
os
import
environ
,
makedirs
,
system
from
os.path
import
join
from
os.path
import
join
from
typing
import
(
Any
,
Dict
,
Optional
,
)
from
galaxy.util.bunch
import
Bunch
from
galaxy.util.bunch
import
Bunch
...
@@ -21,7 +26,10 @@ from .test_utils import (
...
@@ -21,7 +26,10 @@ from .test_utils import (
class
BaseIntegrationTest
(
TempDirectoryTestCase
):
class
BaseIntegrationTest
(
TempDirectoryTestCase
):
def
_run
(
self
,
app_conf
=
{},
job_conf_props
=
{},
**
kwds
):
def
_run
(
self
,
app_conf
:
Optional
[
Dict
[
str
,
Any
]]
=
None
,
job_conf_props
:
Optional
[
Dict
[
str
,
str
]]
=
None
,
**
kwds
):
app_conf
=
app_conf
or
{}
job_conf_props
=
job_conf_props
or
{}
app_conf
=
app_conf
.
copy
()
app_conf
=
app_conf
.
copy
()
job_conf_props
=
job_conf_props
.
copy
()
job_conf_props
=
job_conf_props
.
copy
()
...
@@ -32,9 +40,8 @@ class BaseIntegrationTest(TempDirectoryTestCase):
...
@@ -32,9 +40,8 @@ class BaseIntegrationTest(TempDirectoryTestCase):
self
.
__setup_dependencies
(
app_conf
)
self
.
__setup_dependencies
(
app_conf
)
self
.
_run_in_app
(
app_conf
,
**
kwds
)
self
.
_run_in_app
(
app_conf
,
**
kwds
)
def
_run_in_app
(
self
,
app_conf
,
**
kwds
):
def
_run_in_app
(
self
,
app_conf
:
Dict
[
str
,
Any
],
direct_interface
:
bool
=
False
,
inject_files_endpoint
:
bool
=
False
,
**
kwds
):
direct_interface
=
kwds
.
get
(
"
direct_interface
"
,
None
)
inject_files_endpoint
=
direct_interface
or
inject_files_endpoint
inject_files_endpoint
=
direct_interface
or
kwds
.
get
(
"
inject_files_endpoint
"
,
False
)
if
inject_files_endpoint
:
if
inject_files_endpoint
:
# Client directory hasn't bee created yet, don't restrict where
# Client directory hasn't bee created yet, don't restrict where
# test files written.
# test files written.
...
@@ -74,7 +81,7 @@ class BaseIntegrationTest(TempDirectoryTestCase):
...
@@ -74,7 +81,7 @@ class BaseIntegrationTest(TempDirectoryTestCase):
else
:
else
:
options
[
"
jobs_directory
"
]
=
staging_directory
options
[
"
jobs_directory
"
]
=
staging_directory
def
__setup_job_properties
(
self
,
app_conf
,
job_conf_props
):
def
__setup_job_properties
(
self
,
app_conf
,
job_conf_props
:
Dict
[
str
,
str
]
):
if
job_conf_props
:
if
job_conf_props
:
job_conf
=
join
(
self
.
temp_directory
,
"
job_managers.ini
"
)
job_conf
=
join
(
self
.
temp_directory
,
"
job_managers.ini
"
)
config
=
configparser
.
ConfigParser
()
config
=
configparser
.
ConfigParser
()
...
...
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