-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #319 from jgsogo/jenkins/slave
- Loading branch information
Showing
2 changed files
with
16 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import pytest | ||
|
||
|
||
@pytest.mark.service('jenkins') | ||
class TestJenkinsAgent: | ||
|
||
def test_java(self, container): | ||
out, err = container.exec(['java', '-version']) | ||
# Check Java, up to minor version | ||
assert 'openjdk version "1.8' in err, f"out: '{out}' err: '{err}'" | ||
|
||
def test_entrypoint(self, container): | ||
out, err = container.exec(['/opt/entrypoint.sh']) | ||
# It shows help (missing arguments), but we know it works | ||
assert 'java -jar agent.jar [options...] <secret key> <agent name>' in err, f"out: '{out}' err: '{err}'" |