forked from kruize/autotune
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request kruize#1293 from shekhar316/namespace-tests
Adding Tests for Namespace Recommendations and Experiment Type
- Loading branch information
Showing
9 changed files
with
1,774 additions
and
15 deletions.
There are no files selected for viewing
764 changes: 764 additions & 0 deletions
764
tests/scripts/helpers/list_reco_json_local_monitoring_schema.py
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
29 changes: 29 additions & 0 deletions
29
tests/scripts/local_monitoring_tests/json_files/create_exp_template.json
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
[{ | ||
"version": "{{version}}", | ||
"experiment_name": "{{experiment_name}}", | ||
"cluster_name": "{{cluster_name}}", | ||
"performance_profile": "{{performance_profile}}", | ||
"mode": "{{mode}}", | ||
"target_cluster": "{{target_cluster}}", | ||
"datasource": "{{datasource}}", | ||
"kubernetes_objects": [{ | ||
"experiment_type": "{{experiment_type}}", | ||
"type": "{{kubernetes_obj_type}}", | ||
"name": "{{name}}", | ||
"namespace": "{{namespace}}", | ||
"namespaces": { | ||
"namespace_name": "{{namespace_name}}" | ||
}, | ||
"containers": [{ | ||
"container_image_name": "{{container_image_name}}", | ||
"container_name": "{{container_name}}" | ||
}] | ||
}], | ||
"trial_settings": { | ||
"measurement_duration": "{{measurement_duration}}" | ||
}, | ||
"recommendation_settings": { | ||
"threshold": "{{threshold}}" | ||
} | ||
}] | ||
|
48 changes: 48 additions & 0 deletions
48
tests/scripts/local_monitoring_tests/json_files/create_multiple_namespace_exp.json
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
[ | ||
{ | ||
"version": "v2.0", | ||
"experiment_name": "tfb-workload-namespace", | ||
"cluster_name": "default", | ||
"performance_profile": "resource-optimization-local-monitoring", | ||
"mode": "monitor", | ||
"target_cluster": "local", | ||
"datasource": "prometheus-1", | ||
"kubernetes_objects": [ | ||
{ | ||
"experiment_type": "namespace", | ||
"namespaces": { | ||
"namespace_name": "default" | ||
} | ||
} | ||
], | ||
"trial_settings": { | ||
"measurement_duration": "15min" | ||
}, | ||
"recommendation_settings": { | ||
"threshold": "0.1" | ||
} | ||
}, | ||
{ | ||
"version": "v2.0", | ||
"experiment_name": "multiple-import-namespace", | ||
"cluster_name": "default", | ||
"performance_profile": "resource-optimization-openshift", | ||
"mode": "monitor", | ||
"target_cluster": "local", | ||
"datasource": "prometheus-1", | ||
"kubernetes_objects": [ | ||
{ | ||
"experiment_type": "namespace", | ||
"namespaces": { | ||
"namespace_name": "test-multiple-import" | ||
} | ||
} | ||
], | ||
"trial_settings": { | ||
"measurement_duration": "15min" | ||
}, | ||
"recommendation_settings": { | ||
"threshold": "0.1" | ||
} | ||
} | ||
] |
Oops, something went wrong.