-
Notifications
You must be signed in to change notification settings - Fork 9
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
Conversation
5c723cf
to
b50df3c
Compare
There was a problem hiding this 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 |
There was a problem hiding this comment.
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", |
There was a problem hiding this comment.
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?
1813722
to
7aaa0ee
Compare
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: |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
🎉 This PR is included in version 6.1.0-beta.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
🎉 This PR is included in version 6.1.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
extending integration tests to include status cases 400 and 403