MCPcopy Index your code
hub / github.com/devspace-sh/devspace / TestStatus

Function TestStatus

pkg/devspace/deploy/deployer/helm/status_test.go:31–156  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

29}
30
31func TestStatus(t *testing.T) {
32 testCases := []statusTestCase{
33 {
34 name: "Deployment successful",
35 deployment: "deployed",
36 releases: []*helmtypes.Release{
37 {
38 Name: "deployed",
39 Status: "DEPLOYED",
40 },
41 },
42 helmConfig: &latest.HelmConfig{
43 Chart: &latest.ChartConfig{
44 Name: "chartName",
45 Version: "chartVersion",
46 },
47 },
48 expectedStatus: deployer.StatusResult{
49 Name: "deployed",
50 Type: "Helm",
51 Target: "chartName (chartVersion)",
52 Status: "Deployed",
53 },
54 },
55 {
56 name: "helmReleaseName",
57 deployment: "deployment",
58 releases: []*helmtypes.Release{
59 {
60 Name: "releaseName",
61 Status: "DEPLOYED",
62 },
63 },
64 helmConfig: &latest.HelmConfig{
65 ReleaseName: "releaseName",
66 Chart: &latest.ChartConfig{
67 Name: "chartName",
68 Version: "chartVersion",
69 },
70 },
71 expectedStatus: deployer.StatusResult{
72 Name: "deployment",
73 Type: "Helm",
74 Target: "chartName (chartVersion)",
75 Status: "Deployed",
76 },
77 },
78 {
79 name: "No releases",
80 deployment: "depl",
81 expectedStatus: deployer.StatusResult{
82 Name: "depl",
83 Type: "Helm",
84 Target: "N/A",
85 Status: "Not deployed",
86 },
87 },
88 {

Callers

nothing calls this directly

Calls 4

StatusMethod · 0.95
EqualMethod · 0.80
WithKubeClientMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected