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

Function TestDeploy

pkg/devspace/deploy/deploy_test.go:115–212  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

113}
114
115func TestDeploy(t *testing.T) {
116 testCases := []deployTestCase{
117 {
118 name: "Skip deployment",
119 deploymentConfigs: map[string]*latest.DeploymentConfig{
120 "skippedDeployment": {
121 Name: "skippedDeployment",
122 },
123 },
124 options: &Options{
125 SkipDeploy: true,
126 Render: true,
127 },
128 deploymentNames: []string{"unskippedDeployment"},
129 },
130 {
131 name: "No deployment method",
132 deploymentConfigs: map[string]*latest.DeploymentConfig{
133 "noMethod": {
134 Name: "noMethod",
135 },
136 },
137 deploymentNames: []string{"noMethod"},
138 options: &Options{
139 Render: true,
140 },
141 expectedErr: "error deploying: deployment noMethod has no deployment method",
142 },
143 {
144 name: "Deploy with kubectl",
145 deploymentConfigs: map[string]*latest.DeploymentConfig{
146 "kubectlDeploy": {
147 Name: "kubectlDeploy",
148 Kubectl: &latest.KubectlConfig{
149 Manifests: []string{},
150 },
151 },
152 },
153 options: &Options{
154 Render: true,
155 },
156 deploymentNames: []string{"kubectlDeploy"},
157 },
158 {
159 name: "Deploy concurrently",
160 deploymentConfigs: map[string]*latest.DeploymentConfig{
161 "concurrentDeploy1": {
162 Name: "concurrentDeploy1",
163 Kubectl: &latest.KubectlConfig{
164 Manifests: []string{},
165 },
166 },
167 "concurrentDeploy2": {
168 Name: "concurrentDeploy2",
169 Kubectl: &latest.KubectlConfig{
170 Manifests: []string{},
171 },
172 },

Callers

nothing calls this directly

Calls 7

DeployMethod · 0.95
NewCacheFunction · 0.92
NewControllerFunction · 0.70
NewConfigMethod · 0.65
WithConfigMethod · 0.65
WithKubeClientMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected