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

do not ignore incorrect localCheckoutDir #449

Closed
jtnord opened this issue Feb 8, 2023 · 0 comments · Fixed by #483
Closed

do not ignore incorrect localCheckoutDir #449

jtnord opened this issue Feb 8, 2023 · 0 comments · Fixed by #483
Labels

Comments

@jtnord
Copy link
Member

jtnord commented Feb 8, 2023

Jenkins and plugins versions report

if the local checkout directory is provided but does not exist no error is raised

In reviewing #484 I was alerted to the fact that the pct considers the local checkout directory to not be provided if it does not exist.

This violates the principle of least surprise - it the option is provided yet the path does not exist the pct should return with an error rather than continuing on to test something that may not be what was intended.

What Operating System are you using (both controller, and any agents involved in the problem)?

windows - but this is cross platform.

Reproduction steps

run the pct with the localCheckout option set to a non existant directory

e.g.
java -Xmx1g -jar target\plugins-compat-tester-cli.jar -workDirectory c:\workarea\source\github\cloudbees\unified-release\output-caffeine-api\work -reportFile c:\workarea\source\github\cloudbees\unified-release\output-caffeine-api\out\report.xml -war c:\workarea\source\github\cloudbees\unified-release\products\core-cm\target\core-cm.war -storeAll -fallbackGitHubOrganization jenkinsci-cert -hookPrefixes com.cloudbees.hooks -externalHooksJars c:\workarea\source\github\cloudbees\unified-release\tests\cb-pct-hooks\target\cb-pct-hooks.jar -includePlugins caffeine-api -mavenPropertiesFile c:\workarea\source\github\cloudbees\unified-release\output-caffeine-api\work\maven.properties -mavenProperties jenkins.version=2.375.3-cb-1 -localCheckoutDir c:\workarea\does-not-exist

note that c:\workarea\does-not-exist does not exist :)

Expected Results

pct fails

Actual Results

pct runs and passes

Anything else?

No response

@jtnord jtnord added the bug label Feb 8, 2023
@jtnord jtnord mentioned this issue Feb 14, 2023
jtnord added a commit that referenced this issue Mar 3, 2023
if a File based paramter is set (excluding workingDir which we create)
then parsing the arg will fail early rather than continuing and then
erroring (or silently swallowing it) later in the run

fixes #449
jtnord added a commit that referenced this issue Mar 3, 2023
if a File based paramter is set (excluding workingDir which we create)
then parsing the arg will fail early rather than continuing and then
erroring (or silently swallowing it) later in the run

fixes #449
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant