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

[COST-1455] Enhance existing AWS resource types api to support searching #2898

Merged
merged 4 commits into from
Jun 7, 2021

Conversation

Fozzywozzybear
Copy link
Contributor

@Fozzywozzybear Fozzywozzybear commented May 25, 2021

Adds the ability to search for values containing data that the user inputs to the search field.

  1. Create test data
  2. Go to http://localhost:8000/api/cost-management/v1/resource-types/aws-accounts/ adding the ?search= to the end of the url will allow the user to search, try ?search=1. This will return only the values with the number 1 in them. While keeping ascending order of the results.
  3. Go to http://localhost:8000/api/cost-management/v1/resource-types/aws-organizational-units/ adding in the ?search= to the end of the url, allowing the user to search. Test ?search=001, this should return the values with only 001. While keeping ascending order of the results.

Below are the failed smokes, they seem unrelated to the changes made in this pr.
10 failed, 5939 passed, 13 skipped, 705 deselected in 3430.36s (0:57:10)

 FAILED lib64/python3.6/site-packages/iqe_cost_management/tests/rest_api/v1/test_aws_instance_reports.py::test_api_aws_instance_or_group_bys_daily[instance_types] - Assertio...
FAILED lib64/python3.6/site-packages/iqe_cost_management/tests/rest_api/v1/test_azure_cost_reports.py::test_api_azure_cost_tag_validate_keys_visible - AssertionError: Faili...
FAILED lib64/python3.6/site-packages/iqe_cost_management/tests/rest_api/v1/test_cost_model.py::test_api_cost_model_recalc_window - AssertionError: assert {'clusters': ...':...
FAILED lib64/python3.6/site-packages/iqe_cost_management/tests/rest_api/v1/test_gcp_instance_reports.py::test_api_gcp_instance_or_group_bys_daily[instance_types] - Assertio...
FAILED lib64/python3.6/site-packages/iqe_cost_management/tests/rest_api/v1/test_ocp_on_azure_storage_reports.py::test_api_ocp_on_azure_storage_tag_multiple_validate_total
FAILED lib64/python3.6/site-packages/iqe_cost_management/tests/rest_api/v1/test_ocp_on_azure_storage_reports.py::test_api_ocp_on_azure_storage_date_range_report_filter_match_date_range_tag[last-10-days]
FAILED lib64/python3.6/site-packages/iqe_cost_management/tests/rest_api/v1/test_ocp_on_azure_storage_reports.py::test_api_ocp_on_azure_storage_date_range_report_filter_match_date_range_tag[last-30-days]
FAILED lib64/python3.6/site-packages/iqe_cost_management/tests/rest_api/v1/test_ocp_on_azure_storage_reports.py::test_api_ocp_on_azure_storage_date_range_report_filter_match_date_range_tag[last-month-daily]
FAILED lib64/python3.6/site-packages/iqe_cost_management/tests/rest_api/v1/test_ocp_on_azure_storage_reports.py::test_api_ocp_on_azure_storage_date_range_report_filter_match_date_range_tag[two-months-ago-daily]
FAILED lib64/python3.6/site-packages/iqe_cost_management/tests/rest_api/v1/test_user.py::test_api_settings_aws_tag_enablement - AssertionError: assert 'for' == 'no-environm...

@app-sre-bot
Copy link
Collaborator

Can one of the admins verify this patch?

@codecov
Copy link

codecov bot commented May 25, 2021

Codecov Report

Merging #2898 (6bb14b7) into master (1071369) will increase coverage by 0.0%.
The diff coverage is 100.0%.

@@          Coverage Diff           @@
##           master   #2898   +/-   ##
======================================
  Coverage    95.0%   95.0%           
======================================
  Files         295     295           
  Lines       23523   23525    +2     
  Branches     2621    2621           
======================================
+ Hits        22347   22349    +2     
  Misses        702     702           
  Partials      474     474           

@Fozzywozzybear Fozzywozzybear marked this pull request as ready for review May 27, 2021 13:40
@Fozzywozzybear Fozzywozzybear changed the title Search feature added to resource-types/aws-accounts/ and /aws-organizational-units Search feature added to resource-types/aws-accounts/ and /aws-organizational-units [COST-1455]<Enhance existing AWS resource types api to support searching> Jun 2, 2021
@Fozzywozzybear Fozzywozzybear changed the title Search feature added to resource-types/aws-accounts/ and /aws-organizational-units [COST-1455]<Enhance existing AWS resource types api to support searching> [COST-1455]<Enhance existing AWS resource types api to support searching> Jun 2, 2021
@Fozzywozzybear Fozzywozzybear changed the title [COST-1455]<Enhance existing AWS resource types api to support searching> [COST-1455] Enhance existing AWS resource types api to support searching Jun 2, 2021
@Fozzywozzybear Fozzywozzybear merged commit b63979b into master Jun 7, 2021
@maskarb maskarb deleted the CostA-1455 branch September 2, 2021 22:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants