-
Notifications
You must be signed in to change notification settings - Fork 56
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
[Tests] Adding New Tests For Create Experiment API with VPA Modes #1467
Open
shekhar316
wants to merge
2
commits into
kruize:mvp_demo
Choose a base branch
from
shekhar316:vpa-test
base: mvp_demo
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pytest -vv --html=tmp/report.html --cluster_type openshift test_create_experiment.py
================================================================================== test session starts ==================================================================================
platform linux -- Python 3.12.4, pytest-8.0.0, pluggy-1.4.0 -- /usr/bin/python3
cachedir: .pytest_cache
metadata: {'Python': '3.12.4', 'Platform': 'Linux-6.10.3-200.fc40.x86_64-x86_64-with-glibc2.39', 'Packages': {'pytest': '8.0.0', 'pluggy': '1.4.0'}, 'Plugins': {'metadata': '3.1.0', 'html': '3.2.0'}, 'JAVA_HOME': '/opt/jdk-21.0.1+12'}
rootdir: /home/shesaxen/redhat/codebase/testKruize/autotune/tests/scripts/local_monitoring_tests
configfile: pytest.ini
plugins: metadata-3.1.0, html-3.2.0
collected 13 items
test_create_experiment.py::test_create_exp_valid_tests[valid_auto_mode_exp_with_exp_type-201-v2.0-tfb-auto-container-exp-default-resource-optimization-local-monitoring-auto-local-prometheus-1-None-deployment-tfb-qrh-sample-default-None-kruize/tfb-qrh:1.13.2.F_et17-tfb-server-15min-0.1] PASSED [ 7%]
test_create_experiment.py::test_create_exp_valid_tests[valid_recreate_mode_exp_with_exp_type-201-v2.0-tfb-recreate-container-exp-default-resource-optimization-local-monitoring-recreate-local-prometheus-1-container-deployment-tfb-qrh-sample-default-None-kruize/tfb-qrh:1.13.2.F_et17-tfb-server-15min-0.1] PASSED [ 15%]
test_create_experiment.py::test_create_exp_valid_tests[valid_auto_mode_exp_without_exp_type-201-v2.0-tfb-auto-default-resource-optimization-local-monitoring-auto-local-prometheus-1-None-deployment-tfb-qrh-sample-default-None-kruize/tfb-qrh:1.13.2.F_et17-tfb-server-15min-0.1] PASSED [ 23%]
test_create_experiment.py::test_create_exp_valid_tests[valid_recreate_mode_exp_without_exp_type-201-v2.0-tfb-recreate-default-resource-optimization-local-monitoring-recreate-local-prometheus-1-container-deployment-tfb-qrh-sample-default-None-kruize/tfb-qrh:1.13.2.F_et17-tfb-server-15min-0.1] PASSED [ 30%]
test_create_experiment.py::test_create_exp_invalid_tests[invalid_namespace_exp_with_auto_mode-400-Auto or recreate mode is not supported for namespace experiment.-v2.0-tfb-workload-namespace-auto-default-resource-optimization-local-monitoring-auto-local-prometheus-1-namespace-None-None-None-default-None-None-15min-0.1] PASSED [ 38%]
test_create_experiment.py::test_create_exp_invalid_tests[invalid_namespace_exp_with_recreate_mode-400-Auto or recreate mode is not supported for namespace experiment.-v2.0-tfb-workload-namespace-recreate-default-resource-optimization-local-monitoring-recreate-local-prometheus-1-namespace-None-None-None-default-None-None-15min-0.1] PASSED [ 46%]
test_create_experiment.py::test_create_exp_invalid_tests[invalid_auto_mode_exp_with_exp_type_remote_cluster-400-Auto or recreate mode is not supported for remote monitoring use case.-v2.0-tfb-auto-container-exp-remote-default-resource-optimization-local-monitoring-auto-remote-prometheus-1-None-deployment-tfb-qrh-sample-default-None-kruize/tfb-qrh:1.13.2.F_et17-tfb-server-15min-0.1] PASSED [ 53%]
test_create_experiment.py::test_create_exp_invalid_tests[invalid_recreate_mode_exp_with_exp_type_remote_cluster-400-Auto or recreate mode is not supported for remote monitoring use case.-v2.0-tfb-recreate-container-exp-remote-default-resource-optimization-local-monitoring-recreate-remote-prometheus-1-container-deployment-tfb-qrh-sample-default-None-kruize/tfb-qrh:1.13.2.F_et17-tfb-server-15min-0.1] PASSED [ 61%]
test_create_experiment.py::test_create_exp_invalid_tests[invalid_auto_mode_exp_without_exp_type_remote_cluster-400-Auto or recreate mode is not supported for remote monitoring use case.-v2.0-tfb-auto-remote-default-resource-optimization-local-monitoring-auto-remote-prometheus-1-None-deployment-tfb-qrh-sample-default-None-kruize/tfb-qrh:1.13.2.F_et17-tfb-server-15min-0.1] PASSED [ 69%]
test_create_experiment.py::test_create_exp_invalid_tests[invalid_recreate_mode_exp_without_exp_type_remote_cluster-400-Auto or recreate mode is not supported for remote monitoring use case.-v2.0-tfb-recreate-remote-default-resource-optimization-local-monitoring-recreate-remote-prometheus-1-container-deployment-tfb-qrh-sample-default-None-kruize/tfb-qrh:1.13.2.F_et17-tfb-server-15min-0.1] PASSED [ 76%]
test_create_experiment.py::test_create_exp_invalid_tests[invalid_auto_mode_with_unsupported_object_type-400-Kubernetes object type is not supported for auto or recreate mode.-v2.0-tfb-auto-invalid-object-default-resource-optimization-local-monitoring-auto-local-prometheus-1-container-statefulset-tfb-qrh-sample-default-None-kruize/tfb-qrh:1.13.2.F_et17-tfb-server-15min-0.1] PASSED [ 84%]
test_create_experiment.py::test_create_exp_invalid_tests[invalid_recreate_mode_with_unsupported_object_type-400-Kubernetes object type is not supported for auto or recreate mode.-v2.0-tfb-recreate-invalid-object-default-resource-optimization-local-monitoring-recreate-local-prometheus-1-container-job-tfb-qrh-sample-default-None-kruize/tfb-qrh:1.13.2.F_et17-tfb-server-15min-0.1] PASSED [ 92%]
test_create_experiment.py::test_create_multiple_namespace_exp PASSED [100%]
--------------------- generated html file: file:///home/shesaxen/redhat/codebase/testKruize/autotune/tests/scripts/local_monitoring_tests/rest_apis/tmp/report.html ---------------------
================================================================================== 13 passed in 13.44s ==================================================================================
~/redhat/codebase/testKruize/autotune/tests/scripts/local_monitoring_tests/rest_apis git:[vpa-test] |
Signed-off-by: Shekhar Saxena <[email protected]>
Signed-off-by: Shekhar Saxena <[email protected]>
chandrams
approved these changes
Jan 22, 2025
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.
LGTM
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
POST /createExperiment API
valid
container
experiment withoutexperiment_type
andmode=auto
valid
container
experiment withoutexperiment_type
andmode=recreate
valid
container
experiment withexperiment_type
andmode=auto
valid
container
experiment withexperiment_type
andmode=recreate
invalid
namespace
experiment withmode=auto
invalid
namespace
experiment withmode=recreate
invalid
container
experiment withexperiment_type
,target_cluster=remote
andmode=recreate
invalid
container
experiment withexperiment_type
,target_cluster=remote
andmode=auto
invalid
container
experiment withoutexperiment_type
,target_cluster=remote
andmode=recreate
invalid
container
experiment withoutexperiment_type
,target_cluster=remote
andmode=auto
invalid
container
experiment withauto
mode with invalid kubernetes objecttype
invalid
container
experiment withrecreate
mode with invalid kubernetes objecttype
Type of change
How has this been tested?
On Openshift Cluster
Test Configuration
Checklist 🎯
Additional information
PR # 1463 https://github.com/kruize/autotune/pull/1463/ and #1437 needs to be merged before this one.