Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
truenas-rk3588
truenas
Commits
295e5724
Unverified
Commit
295e5724
authored
1 year ago
by
sonicaj
Committed by
GitHub
1 year ago
Browse files
Options
Download
Email Patches
Plain Diff
Fix failing integration tests (#13059)
parent
e39bd6d6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tests/api2/test_apps_roles.py
+3
-3
tests/api2/test_apps_roles.py
tests/api2/test_certificate_roles.py
+1
-1
tests/api2/test_certificate_roles.py
with
4 additions
and
4 deletions
+4
-4
tests/api2/test_apps_roles.py
View file @
295e5724
...
...
@@ -18,7 +18,7 @@ def test_app_readonly_role():
(
'CATALOG_WRITE'
,
'app.similar'
,
[],
False
,
True
,
True
,
False
),
(
'CATALOG_READ'
,
'catalog.sync_all'
,
[],
True
,
False
,
False
,
True
),
(
'CATALOG_READ'
,
'catalog.sync'
,
[],
True
,
False
,
True
,
True
),
(
'CATALOG_READ'
,
'catalog.validate'
,
[],
True
,
Tru
e
,
True
,
False
),
(
'CATALOG_READ'
,
'catalog.validate'
,
[],
True
,
Fals
e
,
True
,
False
),
(
'CATALOG_WRITE'
,
'catalog.sync_all'
,
[],
True
,
True
,
False
,
True
),
(
'CATALOG_WRITE'
,
'catalog.sync'
,
[],
True
,
True
,
True
,
True
),
(
'CATALOG_WRITE'
,
'catalog.validate'
,
[],
True
,
True
,
True
,
False
),
...
...
@@ -43,7 +43,7 @@ def test_catalog_read_and_write_role(
(
'APPS_WRITE'
,
'container.prune'
,
True
,
True
),
])
def
test_apps_read_and_write_roles
(
role
,
endpoint
,
job
,
should_work
):
common_checks
(
endpoint
,
role
,
should_work
,
method_kwargs
=
{
'job'
:
job
})
common_checks
(
endpoint
,
role
,
should_work
,
valid_role_exception
=
False
,
method_kwargs
=
{
'job'
:
job
})
@
pytest
.
mark
.
parametrize
(
'role,endpoint,job,should_work'
,
[
...
...
@@ -70,4 +70,4 @@ def test_apps_read_and_write_roles_with_params(role, endpoint, job, should_work)
(
'KUBERNETES_WRITE'
,
'kubernetes.events'
,
False
,
True
),
])
def
test_kubernetes_read_and_write_roles
(
role
,
endpoint
,
job
,
should_work
):
common_checks
(
endpoint
,
role
,
should_work
,
method_kwargs
=
{
'job'
:
job
})
common_checks
(
endpoint
,
role
,
should_work
,
valid_role_exception
=
False
,
method_kwargs
=
{
'job'
:
job
})
This diff is collapsed.
Click to expand it.
tests/api2/test_certificate_roles.py
View file @
295e5724
...
...
@@ -26,7 +26,7 @@ def test_certificate_authority_create_role(role, valid_role):
(
'CERTIFICATE_READ'
,
False
),
))
def
test_certificate_create_role
(
role
,
valid_role
):
common_checks
(
'certificate.create'
,
role
,
valid_role
,
method_args
=
[
{}
],
method_kwargs
=
{
'job'
:
True
})
common_checks
(
'certificate.create'
,
role
,
valid_role
,
method_args
=
[],
method_kwargs
=
{
'job'
:
True
})
@
pytest
.
mark
.
parametrize
(
'role, valid_role'
,
(
...
...
This diff is collapsed.
Click to expand it.
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
Menu
Projects
Groups
Snippets
Help