-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
69 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
from running.config import Configuration | ||
|
||
|
||
def test_openjdk_path_ennvvar(): | ||
c = Configuration( | ||
{ | ||
"runtimes": { | ||
"temurin-21_bogus": { | ||
"type": "OpenJDK", | ||
"release": 21, | ||
# some bogus environment variable that will not be expanded | ||
"home": "$DAHKDLHDIWHEIUWHEIWEHIJHDJKAGDKJADGUQDGIQUWDGI/temurin-21-jdk-amd64", | ||
}, | ||
"temurin-21": { | ||
"type": "OpenJDK", | ||
"release": 21, | ||
"home": "$HOME/temurin-21-jdk-amd64", | ||
}, | ||
} | ||
} | ||
) | ||
|
||
c.resolve_class() | ||
temurin_21_bogus = c.get("runtimes")["temurin-21_bogus"] | ||
temurin_21 = c.get("runtimes")["temurin-21_bogus"] | ||
assert "$HOME" not in str(temurin_21.home) | ||
assert "$DAHKDLHDIWHEIUWHEIWEHIJHDJKAGDKJADGUQDGIQUWDGI" in str( | ||
temurin_21_bogus.home | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters