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

test: add integration tests #268

Merged
merged 10 commits into from
Jan 9, 2024

Conversation

sgoral-splunk
Copy link
Contributor

@sgoral-splunk sgoral-splunk commented Jan 4, 2024

extending integration tests to include status cases 400 and 403

@sgoral-splunk sgoral-splunk force-pushed the chore/ADDON-67423_add_integration_tests branch from 5c723cf to b50df3c Compare January 4, 2024 15:03
Copy link
Member

@artemrys artemrys left a comment

Choose a reason for hiding this comment

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

This PR still shows year change.

sudo /opt/splunk/bin/splunk restart
- name: run tests
run: |
poetry run pytest tests/integration
SPLUNK_ADMIN=admin SPLUNK_ADMIN_PWD=Chang3d! SPLUNK_USER=user SPLUNK_USER_PWD=Chang3d! poetry run pytest tests/integration
Copy link
Member

Choose a reason for hiding this comment

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

SPLUNK_ADMIN=admin -> SPLUNK_ADMIN=$SPLUNK_ADMIN?

See splunkd.log/python.log for more details.</msg>"""
try:
response = requests.delete(
f"https://{host}:{management_port}/servicesNS/-/demo/demo_demo/dashboard",
Copy link
Member

Choose a reason for hiding this comment

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

Why do we have dashboard here?

@sgoral-splunk sgoral-splunk force-pushed the chore/ADDON-67423_add_integration_tests branch from 1813722 to 7aaa0ee Compare January 5, 2024 12:02
@sgoral-splunk sgoral-splunk requested a review from artemrys January 5, 2024 13:09
@sgoral-splunk sgoral-splunk changed the title chore: add integration tests test: add integration tests Jan 5, 2024
from python handler: "REST Error [400]: Bad Request -- HTTP 400 Bad Request --
b'{"messages":[{"type":"ERROR","text":"Object id=demo://test_input cannot be deleted in config=inputs."}]}'".
See splunkd.log/python.log for more details.</msg>"""
try:
Copy link
Member

Choose a reason for hiding this comment

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

Can we remove try / except and response.raise_for_status and instead check for response.status_code == 500? Same below.

Copy link
Member

Choose a reason for hiding this comment

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

I don't want to have any logic in the tests, we should aim to have those tests as simple as we can.

@sgoral-splunk sgoral-splunk requested a review from artemrys January 5, 2024 16:51
@artemrys artemrys merged commit f6ff6a6 into develop Jan 9, 2024
16 checks passed
@artemrys artemrys deleted the chore/ADDON-67423_add_integration_tests branch January 9, 2024 12:31
@github-actions github-actions bot locked and limited conversation to collaborators Jan 9, 2024
@srv-rr-github-token
Copy link
Contributor

🎉 This PR is included in version 6.1.0-beta.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@srv-rr-github-token
Copy link
Contributor

🎉 This PR is included in version 6.1.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants