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

Function test_list_release

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

Source from the content-addressed store, hash-verified

2175
2176 #[test]
2177 fn test_list_release() {
2178 let HelmTestCtx {
2179 ref helm,
2180 ref mut charts,
2181 } = HelmTestCtx::new("test-list-release");
2182 charts[0].namespace = HelmChartNamespaces::Custom("hello-my-friend-this-is-a-test".to_string());
2183
2184 // no existing namespace should return an empty array
2185 let ret = helm.list_release(Some("tsdfsfsdf"), &[]);
2186 assert!(matches!(ret, Ok(vec) if vec.is_empty()));
2187
2188 // install something
2189 let ret = helm.upgrade(&charts[0], &[], &CommandKiller::never());
2190 assert!(matches!(ret, Ok(())));
2191
2192 // We should have at least one release in all the release
2193 let ret = helm.list_release(None, &[]);
2194 assert!(matches!(ret, Ok(vec) if !vec.is_empty()));
2195
2196 // We should have at least one release in all the release
2197 let ret = helm.list_release(Some(&charts[0].get_namespace_string()), &[]);
2198 assert!(matches!(ret, Ok(vec) if vec.len() == 1));
2199
2200 // Install a second stuff
2201 let HelmTestCtx {
2202 ref helm,
2203 ref mut charts,
2204 } = HelmTestCtx::new("test-list-release-2");
2205 charts[0].namespace = HelmChartNamespaces::Custom("hello-my-friend-this-is-a-test".to_string());
2206 let ret = helm.upgrade(&charts[0], &[], &CommandKiller::never());
2207 assert!(matches!(ret, Ok(())));
2208
2209 let ret = helm.list_release(Some(&charts[0].get_namespace_string()), &[]);
2210 assert!(matches!(ret, Ok(vec) if vec.len() == 2));
2211 }
2212
2213 #[test]
2214 fn test_upgrade_diff() {

Callers

nothing calls this directly

Calls 3

list_releaseMethod · 0.80
upgradeMethod · 0.80
get_namespace_stringMethod · 0.80

Tested by

no test coverage detected