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

Ensure testcase filtering on the API side returns the three duration fields #2531

Merged
merged 1 commit into from
Oct 11, 2021

Conversation

mfonism
Copy link
Contributor

@mfonism mfonism commented Sep 16, 2021

This is a more readable/simplified version of PR #2530.

Refs #1923

@mfonism
Copy link
Contributor Author

mfonism commented Sep 16, 2021

I can squash the two commits into one if this looks good.

If we need to ensure filtering on the duration fields works on the API side, I can remove the second commit and leave just d18483b.

tcms/rpc/api/testcase.py Outdated Show resolved Hide resolved
@mfonism
Copy link
Contributor Author

mfonism commented Sep 17, 2021

@atodorov I've implemented the changes you requested.

I Casted the duration field values to float (instead of str) because I realized the database converts them to milliseconds first before casting them into the requested type. And I thought it would be more appropriate to get the milliseconds as floats instead of strings.

tcms/rpc/api/testcase.py Outdated Show resolved Hide resolved
tcms/rpc/api/testcase.py Outdated Show resolved Hide resolved
tcms/rpc/api/testcase.py Outdated Show resolved Hide resolved
tcms/rpc/tests/test_testcase.py Outdated Show resolved Hide resolved
tcms/rpc/tests/test_testcase.py Outdated Show resolved Hide resolved
@mfonism
Copy link
Contributor Author

mfonism commented Sep 21, 2021

@atodorov the failure on postgres comes from its inability to cast the duration fields to integer fields or float fields.

https://github.com/kiwitcms/Kiwi/pull/2531/checks?check_run_id=3667534662#step:5:1348

@mfonism
Copy link
Contributor Author

mfonism commented Oct 11, 2021

@atodorov please see the changes.

Copy link
Member

@atodorov atodorov left a comment

Choose a reason for hiding this comment

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

Functionality wise looks good but see the failing black, flake8 and pylint checks. They are all related.

@atodorov atodorov merged commit 2aabe55 into kiwitcms:master Oct 11, 2021
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.

2 participants