MCPcopy Create free account
hub / github.com/Qovery/engine / q_application_test

Function q_application_test

lib-engine/tests/helm/chart_testing.rs:195–247  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

193#[test]
194#[ignore]
195fn q_application_test() {
196 dotenv::dotenv().ok();
197 let test_info = application_context();
198 let chart_name = "q-container";
199 let uuid = test_info.service_id;
200 let chart = CommonChart {
201 chart_info: ChartInfo {
202 name: chart_name.to_string(),
203 path: chart_path(&test_info.temp_dir, &test_info.service_folder_type, &uuid, chart_name),
204 namespace: HelmChartNamespaces::KubeSystem,
205 action: HelmAction::Deploy,
206 atomic: false,
207 force_upgrade: false,
208 force_conflicts: false,
209 recreate_pods: false,
210 reinstall_chart_if_installed_version_is_below_than: None,
211 timeout_in_seconds: 0,
212 dry_run: false,
213 wait: false,
214 values: vec![],
215 values_string: vec![],
216 values_files: vec![],
217 values_json: vec![],
218 yaml_files_content: vec![],
219 parse_stderr_for_error: false,
220 k8s_selector: None,
221 backup_resources: None,
222 crds_update: None,
223 skip_if_already_installed: false,
224 upgrade_retry: None,
225 requires_server_side_apply: false,
226 helm_list_cache: None,
227 enable_engine_post_renderer_labels: true,
228 },
229 chart_installation_checker: None,
230 vertical_pod_autoscaler: None,
231 pre_execute_action: None,
232 };
233 let resources = get_kube_resources(
234 format!("{}/common/charts/{}", lib_dir(), chart_name).as_str(),
235 chart.chart_info,
236 None,
237 &test_info,
238 &uuid,
239 );
240 for resource in resources.values() {
241 assert!(resource.metadata.annotations.is_some());
242 let annotations = resource.clone().metadata.annotations.unwrap();
243 assert_eq!(annotations.get("annotation_key"), Some(&"annotation_value".to_string()));
244 }
245
246 assert!(!resources.is_empty());
247}
248
249#[cfg(feature = "test-local-kube")]
250#[test]

Callers

nothing calls this directly

Calls 5

application_contextFunction · 0.85
chart_pathFunction · 0.85
get_kube_resourcesFunction · 0.85
as_strMethod · 0.45
cloneMethod · 0.45

Tested by

no test coverage detected