()
| 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() { |
nothing calls this directly
no test coverage detected