Uploaded image for project: 'EJBCA'
  1. EJBCA
  2. ECA-7642

WebEjbcaClearCacheTest should be skipped if not running on localhost

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: EJBCA 7.0.0, EJBCA 6.15.2
    • Component/s: None
    • Labels:

      Description

      WebEjbcaClearCacheTest.testEjbcaClearCacheHttp sends a request to the ClearCacheServlet. ClearCacheServlet fails if the requests does not come from localhost, so the tests always uses "localhost" hardcoded which fails if EJBCA is running on a different container or VM.

      This test case should be skipped if we cannot connect to localhost via HTTP.

      Additionally, there should be a test case of the clear cache URL using "target.hostname". This will not be successful if not accessing via localhost, but we can still check that it does not return HTTP 404. (this would require checking if accessing via "target.hostname" is actually external, which is tricky to do reliably, so I won't implement this)

        Attachments

          Activity

            People

            • Assignee:
              samuel Samuel Lidén Borell
              Reporter:
              samuel Samuel Lidén Borell
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 1 hour
                1h
                Remaining:
                Time Spent - 45 minutes Remaining Estimate - 15 minutes
                15m
                Logged:
                Time Spent - 45 minutes Remaining Estimate - 15 minutes
                45m