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

[full-ci][tests-only] Refactor service health and ready url in tests #10808

Merged
merged 1 commit into from
Dec 31, 2024

Conversation

amrita-shrestha
Copy link
Contributor

@amrita-shrestha amrita-shrestha commented Dec 27, 2024

Description

The problem lies in the test code, which is sending requests to the following incorrect URL: https://localhost:9200/ocalhost:9229/healthz and https://localhost:9200/ocalhost:9229/readyz

As a result, the server returns a 200 status code, but the request is not directed to the intended endpoint, causing tests to pass erroneously.

This PR update test code base to send request to proper url

Note: This PR isolates the problematic service into a separate scenario for testing. Once issue #10661 is resolved, the scenario separation introduced in this PR should be reverted.
A follow-up QA point has been added in #10316.
Screenshot from 2024-12-30 09-43-09

Related Issue

Part of

Motivation and Context

How Has This Been Tested?

  • locally

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests only (no source changes)

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation ticket raised:

| %base_url_hostname%:9297/healthz | antivirus |
When a user sends "GET" request to the following url with no authentication
| endpoint | service |
| http://%base_url_hostname%:9297/healthz | antivirus |
Copy link
Contributor

Choose a reason for hiding this comment

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

so we were sending request to https instead of http

Copy link
Contributor Author

@amrita-shrestha amrita-shrestha Dec 30, 2024

Choose a reason for hiding this comment

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

we are sending request to service health endpoint i.e http://hostname:service_debug_port/...

@amrita-shrestha amrita-shrestha force-pushed the santizeServiceUrlInTests branch 2 times, most recently from bf33695 to 64e9ec5 Compare December 30, 2024 04:35
@nabim777
Copy link
Member

nabim777 commented Dec 30, 2024

LGTM 👍

@amrita-shrestha amrita-shrestha force-pushed the santizeServiceUrlInTests branch 2 times, most recently from 5c988c1 to 59447d3 Compare December 30, 2024 11:18
@amrita-shrestha amrita-shrestha force-pushed the santizeServiceUrlInTests branch from 1f32eec to acc993a Compare December 31, 2024 09:21
@amrita-shrestha amrita-shrestha merged commit 8a522b9 into master Dec 31, 2024
4 checks passed
@amrita-shrestha amrita-shrestha deleted the santizeServiceUrlInTests branch December 31, 2024 10:18
ownclouders pushed a commit that referenced this pull request Dec 31, 2024
[full-ci][tests-only] Refactor service health and ready url in tests
ownclouders pushed a commit that referenced this pull request Jan 1, 2025
[full-ci][tests-only] Refactor service health and ready url in tests
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 this pull request may close these issues.

6 participants