Closed lkemmerer closed 5 years ago
K, AFAIK, this is ready to go. Let me know if there's anything that hasn't been addressed to your satisfaction, @manjula-chikkanagappa and @Paul-Hess.
I use gradle properties to pass in the hub url for running system tests on Jenkins against whichever cluster is passed in as a parameter. This seemed like a more straightforward method than recreating/modifying the properties file during a test run. The way I implemented it will allow Jenkins to generically override any properties rather than just the hub url, which decreases the number of places we have the property names hard coded (so just the jenkins job, the constants file, and the properties file, rather than all that AND the build.gradle file).
It looks like I could use a -D
(system properties) on the gradle command rather than -P
(project properties), which I think should take out that block in the build file...
It looks like I could use a
-D
(system properties) on the gradle command rather than-P
(project properties), which I think should take out that block in the build file...
that sounds so much better!
I'll double check that it works, but I think it should. Not sure why I didn't do that in the first place.
Hm. Switching to -D
doesn't work without adding systemProperties System.properties
to the (possibly with the findAll
unless we want to pass all jvm props over) to the build file. According to this ancient stack overflow answer, it might be because the tests are forked into a new JVM and those properties aren't carried over: https://stackoverflow.com/questions/21406265/how-to-give-system-property-to-my-test-via-gradle-and-d
@manjula-chikkanagappa If you prefer using -D
and System.properties
instead of project properties, I'm happy to make that change. I don't have a preference.
Hm. Switching to
-D
doesn't work without addingsystemProperties System.properties
to the (possibly with thefindAll
unless we want to pass all jvm props over) to the build file. According to this ancient stack overflow answer, it might be because the tests are forked into a new JVM and those properties aren't carried over: https://stackoverflow.com/questions/21406265/how-to-give-system-property-to-my-test-via-gradle-and-d @manjula-chikkanagappa If you prefer using-D
andSystem.properties
instead of project properties, I'm happy to make that change. I don't have a preference.
That would be nice Laurie. These are JVM properties and not gradle properties as pointed out in the stackoverflow link.
got a verbal/slack 👍 from Paul, too.
This is not ready to merge. I need to make a few tweaks, but having folks take a look at it now should help streamline getting all the system test stuff in. It'll let me incorporate feedback while I continue working and get y'all familiar with the code so that Paul can PR hist tests against this branch.