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

Function test_uninstall

lib-engine/src/cmd/helm.rs:2412–2438  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2410
2411 #[test]
2412 fn test_uninstall() {
2413 let HelmTestCtx { ref helm, ref charts } = HelmTestCtx::new("test-uninstall");
2414
2415 // check release does not exist yet
2416 let ret = helm.check_release_exist(&charts[0], &[]);
2417 assert!(matches!(ret, Err(HelmError::ReleaseDoesNotExist(test)) if test == charts[0].name));
2418
2419 // deleting something that does not exist should not be an issue
2420 let ret = helm.uninstall(&charts[0], &[], &CommandKiller::never(), &mut |_| {}, &mut |_| {});
2421 assert!(matches!(ret, Ok(())));
2422
2423 // install it
2424 let ret = helm.upgrade(&charts[0], &[], &CommandKiller::never());
2425 assert!(matches!(ret, Ok(())));
2426
2427 // check now it exists
2428 let ret = helm.check_release_exist(&charts[0], &[]);
2429 assert!(ret.is_ok());
2430
2431 // Delete it
2432 let ret = helm.uninstall(&charts[0], &[], &CommandKiller::never(), &mut |_| {}, &mut |_| {});
2433 assert!(matches!(ret, Ok(())));
2434
2435 // check release does not exist anymore
2436 let ret = helm.check_release_exist(&charts[0], &[]);
2437 assert!(matches!(ret, Err(HelmError::ReleaseDoesNotExist(test)) if test == charts[0].name));
2438 }
2439
2440 #[test]
2441 fn test_getting_version() {

Callers

nothing calls this directly

Calls 3

check_release_existMethod · 0.80
uninstallMethod · 0.80
upgradeMethod · 0.80

Tested by

no test coverage detected