Skip to content

Commit

Permalink
Changed hard-coded value to constant (#69)
Browse files Browse the repository at this point in the history
  • Loading branch information
Thanhphan1147 authored Nov 28, 2023
1 parent 68f4bf1 commit 6978123
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/integration/test_jenkins.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
from .substrings import assert_substrings_not_in_string
from .types_ import UnitWebClient

JENKINS_UID = "2000"
JENKINS_GID = "2000"


async def test_jenkins_update_ui_disabled(
web_address: str, jenkins_client: jenkinsapi.jenkins.Jenkins
Expand Down Expand Up @@ -128,10 +131,10 @@ async def test_storage_mount_owner(application: Application):
assert: jenkins_home belongs to jenkins user.
"""
jenkins_unit: Unit = application.units[0]
command = 'stat --printf="%u" /var/lib/jenkins'
command = 'stat -c "%u %g" /var/lib/jenkins'

action: Action = await jenkins_unit.run(command=command, timeout=60)
await action.wait()

assert action.results.get("return-code") == 0
assert "2000" in str(action.results.get("stdout"))
assert f"{JENKINS_UID} {JENKINS_GID}" in str(action.results.get("stdout"))

0 comments on commit 6978123

Please sign in to comment.