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

Function TestDeploy

pkg/devspace/deploy/deployer/helm/deploy_test.go:40–172  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

38}
39
40func TestDeploy(t *testing.T) {
41 testCases := []deployTestCase{
42 // TODO: redploy is always true because helmCache.ChartHash != hash is always true
43 // {
44 // name: "Don't deploy anything",
45 // deployment: "deploy1",
46 // cache: &remotecache.RemoteCache{
47 // Deployments: []remotecache.DeploymentCache{
48 // {
49 // Name: "deploy1",
50 // DeploymentConfigHash: "42d471330d96e55ab8d144d52f11e3c319ae2661e50266fa40592bb721689a3a",
51 // Helm: &remotecache.HelmCache{
52 // ValuesHash: "ca3d163bab055381827226140568f3bef7eaac187cebd76878e0b63e9e442356",
53 // },
54 // },
55 // },
56 // },
57 // releasesBefore: []*helmtypes.Release{
58 // {
59 // Name: "deploy1",
60 // },
61 // },
62 // },
63 {
64 name: "Deploy one deployment",
65 deployment: "deploy2",
66 chart: ".",
67 values: map[string]interface{}{
68 "val": "fromVal",
69 },
70 expectedDeployed: true,
71 expectedCache: &remotecache.RemoteCache{
72 Deployments: []remotecache.DeploymentCache{
73 {
74 Name: "deploy2",
75 DeploymentConfigHash: "038007a9e5018dcf8ffbabad39c1fdc08251e583d7b19e74b765b815d5302444",
76 Helm: &remotecache.HelmCache{
77 Release: "deploy2",
78 ReleaseNamespace: "testNamespace",
79 ReleaseRevision: "1",
80 ValuesHash: "efd6e101b768968a49f8dba46ef07785ac530ea9f75c4f9ca5733e223b6a4da1",
81 },
82 },
83 },
84 },
85 },
86 {
87 name: "Deploy one deployment with different release name",
88 deployment: "deploy2",
89 chart: ".",
90 values: map[string]interface{}{
91 "val": "fromVal",
92 },
93 releaseName: "deploy2-special",
94 expectedDeployed: true,
95 expectedCache: &remotecache.RemoteCache{
96 Deployments: []remotecache.DeploymentCache{
97 {

Callers

nothing calls this directly

Calls 8

DeployMethod · 0.95
NewCacheFunction · 0.92
NewFunction · 0.92
NewConfigFunction · 0.92
EqualMethod · 0.80
WithConfigMethod · 0.65
WithKubeClientMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected