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

Update tests to use standard conf dir #4709

Merged
merged 1 commit into from Mar 28, 2024
Merged

Update tests to use standard conf dir #4709

merged 1 commit into from Mar 28, 2024

Conversation

edewata
Copy link
Contributor

@edewata edewata commented Mar 27, 2024

Normally the Tomcat conf dir is located immediately under the instance dir. For PKI server, which is based on Tomcat, the location is /var/lib/pki/<instance>/conf.

Depending on the deployment scenario the config files might be mounted from a different location (e.g. /etc/pki/<instance> on Fedora) and the standard conf dir will be just a link to the actual location.

To ensure that the tests are valid for all deployment scenarios they have been updated to use the standard conf dir instead of the Fedora-specific one.

Normally the Tomcat conf dir is located immediately under the
instance dir. For PKI server, which is based on Tomcat, the
location is /var/lib/pki/<instance>/conf.

Depending on the deployment scenario the config files might be
mounted from a different location (e.g. /etc/pki/<instance> on
Fedora) and the standard conf dir will be just a link to the
actual location.

To ensure that the tests are valid for all deployment scenarios
they have been updated to use the standard conf dir instead of
the Fedora-specific one.
Copy link

sonarcloud bot commented Mar 27, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

@edewata edewata requested a review from fmarco76 March 27, 2024 18:17
Copy link
Member

@fmarco76 fmarco76 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

I have just a curiosity. In my mind /etc is the configuration folder so for me it was the place to use for the configuration. What is the scenario to solve where configuration files are in different folder?

@edewata
Copy link
Contributor Author

edewata commented Mar 28, 2024

@fmarco76 Thanks! I'll merge but feel free to continue the discussion.

From a generic Tomcat perspective the conf folder is located under the instance folder. We use /etc because Fedora uses FHS so the conf is just a link to /etc. Other OSes or containers might use different locations (e.g. /data) but in any case the conf will always be under the instance folder and point to the actual location. See the following tickets:

So to make sure the code, the tests, and the docs will be valid for all cases we need to use the standard conf location and let the link translate it into the actual location. This PR is just for the tests, but I'll be updating the code & the docs as well later.

@edewata edewata merged commit 13c25e5 into dogtagpki:master Mar 28, 2024
139 of 140 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.

None yet

2 participants