Introduce a way to add extra argument to library cmd on parametric scenario#4470
Introduce a way to add extra argument to library cmd on parametric scenario#4470cbeauchesne merged 4 commits intomainfrom
Conversation
mtoffl01
left a comment
There was a problem hiding this comment.
(Not a blocker) Thanks for adding the SYSTEM_TESTS_EXTRA_COMMAND_ARGUMENTS to the java container script! But is there a good way to mark that the other libraries will have to do this as well, without us having to do it for all libs right now?
|
I forgot to push a commit ... |
| ${SYSTEM_TESTS_EXTRA_COMMAND_ARGUMENTS:-} \ | ||
| -jar target/dd-trace-java-client-1.0.0.jar |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
There was a problem hiding this comment.
Ah. And I realized that the feature I'd like to test relies on JVM args, not application args, so we need to keep the command as you have it (ignore my suggestion above). As a user of the library_extra_command_arguments for the java test library, I cannot use --arg1, I need to use a JVM option. Perhaps this should be documented, although I don't know of a good generic way to do so, as it may be different for different languages.
There was a problem hiding this comment.
you can definitly do something like :
from utils import context
extra_args = ["--default-option"]
if context.library.name == "java":
extra_args = ["--java-options=1"]
else:
extra_args = ["--default-option=true"]
class Test_stuff:
@scenarios.parametric
@pytest.mark.parametrize(
"library_extra_command_arguments",
[
extra_args,
],
)
def test_stuff(self, test_agent, test_library):
pass
Motivation
Allow to add arbitary argument to library container command in parametric scenario
Changes
Add
library_extra_command_argumentsparameter.Usage :
Workflow
codeownersfile quickly.🚀 Once your PR is reviewed, you can merge it!
🛟 #apm-shared-testing 🛟
Reviewer checklist
[<language>], double-check that only<language>is impacted by the changebuild-XXX-imagelabel is present