Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jul 15, 2024
1 parent 52da4da commit cc609ba
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
4 changes: 3 additions & 1 deletion kubespawner/spawner.py
Original file line number Diff line number Diff line change
Expand Up @@ -2061,7 +2061,9 @@ async def get_pod_manifest(self):
pod_security_context=psc,
env=self.get_env(), # Expansion is handled by get_env
volumes=self._expand_all(self._sorted_dict_values(self.volumes)),
volume_mounts=self._expand_all(self._sorted_dict_values(self.volume_mounts)),
volume_mounts=self._expand_all(
self._sorted_dict_values(self.volume_mounts)
),
working_dir=self.working_dir,
labels=labels,
annotations=annotations,
Expand Down
8 changes: 6 additions & 2 deletions tests/test_spawner.py
Original file line number Diff line number Diff line change
Expand Up @@ -1880,7 +1880,9 @@ async def test_volume_dict():

assert isinstance(manifest.spec.volumes, list)
assert manifest.spec.volumes[0].name == 'volumes-alpha'
assert manifest.spec.volumes[0].persistent_volume_claim["claimName"] == 'alpha-claim'
assert (
manifest.spec.volumes[0].persistent_volume_claim["claimName"] == 'alpha-claim'
)
assert manifest.spec.volumes[1].name == 'volumes-beta'
assert manifest.spec.volumes[1].persistent_volume_claim["claimName"] == 'beta-claim'

Expand All @@ -1907,6 +1909,8 @@ async def test_volume_list():

assert isinstance(manifest.spec.volumes, list)
assert manifest.spec.volumes[0].name == 'volumes-alpha'
assert manifest.spec.volumes[0].persistent_volume_claim["claimName"] == 'alpha-claim'
assert (
manifest.spec.volumes[0].persistent_volume_claim["claimName"] == 'alpha-claim'
)
assert manifest.spec.volumes[1].name == 'volumes-beta'
assert manifest.spec.volumes[1].persistent_volume_claim["claimName"] == 'beta-claim'

0 comments on commit cc609ba

Please sign in to comment.