Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ARCHETYPE-574] Use default values in integration tests goal #232

Conversation

Giovds
Copy link
Contributor

@Giovds Giovds commented Oct 19, 2024

  1. Add failing test case to the integration tests
  2. Use the same configurator as done in the generate goal to provide default values.

I had to change some existing integration tests, because apparently it is possible to add non-existing properties to an archetype in the integration-test goal, while this is not possible when using the generate goal. I've tried to add non-existing properties through the command line; both with -DsomeProp=test and through a properties file -Darchetype.properties=./archetype.properties.

In both cases I was unable to include them while generating an archetype, which leads me to believe the integration test adding those properties to the archetype configuration is wrong compared to the actual implementation. It now matches the replacing of properties correctly. Hence the changes in the existing integration tests. WDYT?


Following this checklist to help us incorporate your
contribution quickly and easily:

  • Make sure there is a ARCHETYPE-574. filed
    for the change (usually before you start working on it). Trivial changes like typos do not
    require a JIRA issue. Your pull request should address just this issue, without
    pulling in other changes.
  • Each commit in the pull request should have a meaningful subject line and body.
  • Format the pull request title like [ARCHETYPE-XXX] SUMMARY,
    where you replace ARCHETYPE-XXX and SUMMARY with the appropriate JIRA issue.
  • Also format the first line of the commit message like [ARCHETYPE-XXX] SUMMARY.
    Best practice is to use the JIRA issue title in both the pull request title and in the first line of the commit message.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Run mvn clean verify to make sure basic checks pass. A more thorough check will
    be performed on your pull request automatically.

If your pull request is about ~20 lines of code you don't need to sign an
Individual Contributor License Agreement if you are unsure
please ask on the developers list.

To make clear that you license your contribution under
the Apache License Version 2.0, January 2004
you have to acknowledge this by using the following check-box.

@Giovds
Copy link
Contributor Author

Giovds commented Oct 19, 2024

@slawekjaranowski I'm not sure if you are the right person to ask, but I see you have been working on the plugin recently. What do you think of the change regarding the integration tests (see description of this PR)?

I had to change some existing integration tests, because apparently it is possible to add non-existing properties to an archetype in the integration-test goal, while this is not possible when using the generate goal. I've tried to add non-existing properties through the command line; both with -DsomeProp=test and through a properties file -Darchetype.properties=./archetype.properties.

In both cases I was unable to include them while generating an archetype, which leads me to believe the integration test adding those properties to the archetype configuration is wrong compared to the actual implementation. It now matches the replacing of properties correctly. Hence the changes in the existing integration tests. WDYT?

@Giovds
Copy link
Contributor Author

Giovds commented Oct 21, 2024

Still unsure why test fails on agent, but succeeds locally..

@slawekjaranowski
Copy link
Member

Still unsure why test fails on agent, but succeeds locally..

I will look at it

@slawekjaranowski
Copy link
Member

@Giovds build fixed in #235

@slawekjaranowski slawekjaranowski force-pushed the ARCHETYPE-574-default-values-not-used-in-integration-tests branch from 0d94fdc to 12b6612 Compare October 21, 2024 19:36
@slawekjaranowski slawekjaranowski merged commit 96374eb into apache:master Oct 22, 2024
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants