Skip to content

Commit 0630ad5

Browse files
committed
test fixes
Signed-off-by: Ryan Swanson <ryan.swanson@loft.sh>
1 parent 46a2f0a commit 0630ad5

5 files changed

Lines changed: 20 additions & 16 deletions

File tree

.github/workflows/unit-tests.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ jobs:
3434
- name: Check out code into the Go module directory
3535
uses: actions/checkout@v1
3636

37+
- name: Uninstall Helm 3.x
38+
run: |
39+
sudo rm -rf $(which helm) || true
40+
3741
- name: Test
3842
shell: bash
3943
run: |

e2e/tests/render/render.go

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,36 +6,36 @@ import (
66
"path/filepath"
77
"strings"
88
"sync"
9-
9+
1010
"github.com/onsi/ginkgo/v2"
11-
11+
1212
"github.com/loft-sh/devspace/cmd"
1313
"github.com/loft-sh/devspace/cmd/flags"
1414
"github.com/loft-sh/devspace/e2e/framework"
1515
"github.com/loft-sh/devspace/pkg/util/factory"
1616
)
1717

1818
var _ = DevSpaceDescribe("build", func() {
19-
19+
2020
initialDir, err := os.Getwd()
2121
if err != nil {
2222
panic(err)
2323
}
24-
24+
2525
// create a new factory
2626
var f factory.Factory
27-
27+
2828
ginkgo.BeforeEach(func() {
2929
f = framework.NewDefaultFactory()
3030
})
31-
31+
3232
// Test cases:
33-
33+
3434
ginkgo.It("should render helm charts", func() {
3535
tempDir, err := framework.CopyToTempDir("tests/render/testdata/helm")
3636
framework.ExpectNoError(err)
3737
defer framework.CleanupTempDir(initialDir, tempDir)
38-
38+
3939
stdout := &Buffer{}
4040
// create build command
4141
renderCmd := &cmd.RunPipelineCmd{
@@ -50,18 +50,18 @@ var _ = DevSpaceDescribe("build", func() {
5050
err = renderCmd.RunDefault(f)
5151
framework.ExpectNoError(err)
5252
content := strings.TrimSpace(stdout.String()) + "\n"
53-
53+
5454
framework.ExpectLocalFileContentsImmediately(
5555
filepath.Join(tempDir, "rendered.txt"),
5656
content,
5757
)
5858
})
59-
59+
6060
ginkgo.It("should render kubectl deployments", func() {
6161
tempDir, err := framework.CopyToTempDir("tests/render/testdata/kubectl")
6262
framework.ExpectNoError(err)
6363
defer framework.CleanupTempDir(initialDir, tempDir)
64-
64+
6565
stdout := &Buffer{}
6666
// create build command
6767
renderCmd := &cmd.RunPipelineCmd{

e2e/tests/render/testdata/helm/rendered.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ metadata:
99
"app.kubernetes.io/component": "test"
1010
"app.kubernetes.io/managed-by": "Helm"
1111
annotations:
12-
"helm.sh/chart": "component-chart-0.9.1"
12+
"helm.sh/chart": "component-chart-0.9.2"
1313
spec:
1414
replicas: 1
1515
strategy:
@@ -26,7 +26,7 @@ spec:
2626
"app.kubernetes.io/component": "test"
2727
"app.kubernetes.io/managed-by": "Helm"
2828
annotations:
29-
"helm.sh/chart": "component-chart-0.9.1"
29+
"helm.sh/chart": "component-chart-0.9.2"
3030
spec:
3131
imagePullSecrets:
3232
nodeSelector:
@@ -78,7 +78,6 @@ spec:
7878
volumeMounts:
7979
initContainers:
8080
volumes:
81-
volumeClaimTemplates:
8281
---
8382
# Source: component-chart/templates/deployment.yaml
8483
# Create headless service for StatefulSet

pkg/devspace/deploy/deployer/helm/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const ComponentChartFolder = "component-chart"
2323
// DevSpaceChartConfig is the config that holds the devspace chart information
2424
var DevSpaceChartConfig = &latest.ChartConfig{
2525
Name: "component-chart",
26-
Version: "0.9.1",
26+
Version: "0.9.2",
2727
RepoURL: "https://charts.devspace.sh",
2828
}
2929

pkg/devspace/pipeline/engine/engine_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ package engine
33
import (
44
"bytes"
55
"context"
6-
"mvdan.cc/sh/v3/expand"
76
"os"
87
"path/filepath"
98
"strings"
109
"testing"
1110

1211
"gotest.tools/assert"
12+
"mvdan.cc/sh/v3/expand"
1313
)
1414

1515
type testCaseShell struct {
@@ -132,5 +132,6 @@ func TestHelmDownload(t *testing.T) {
132132
if err != nil {
133133
t.Fatal(err)
134134
}
135+
135136
assert.Assert(t, strings.Contains(stdout1.String(), `Version:"v4`))
136137
}

0 commit comments

Comments
 (0)