Skip to content

Commit 2ed9abe

Browse files
committed
Update kube versions under test
Signed-off-by: Ryan Swanson <ryan.swanson@loft.sh>
1 parent 2dd0345 commit 2ed9abe

File tree

2 files changed

+21
-8
lines changed

2 files changed

+21
-8
lines changed

.github/workflows/e2e-tests.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ jobs:
2424
strategy:
2525
matrix:
2626
kubernetes_version:
27-
- v1.27.3
28-
- v1.28.0
27+
- v1.35.0
28+
- v1.34.3
2929
steps:
3030
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
3131
- name: Checkout repo
@@ -36,11 +36,11 @@ jobs:
3636
with:
3737
version: ${{ matrix.kubernetes_version }}
3838

39-
# Creates KinD with using k8s versions from the matrix above
40-
- name: Set up kind with K8s version v1.22.4
39+
# Creates kind using the Kubernetes versions from the matrix above
40+
- name: Set up kind cluster
4141
uses: engineerd/setup-kind@v0.5.0
4242
with:
43-
version: "v0.20.0"
43+
version: "v0.31.0"
4444
image: kindest/node:${{ matrix.kubernetes_version }}
4545

4646
- name: Testing kind cluster set-up

e2e/tests/sync/sync.go

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import (
44
"context"
55
"os"
66
"path/filepath"
7+
"strings"
78
"sync"
89
"time"
910

@@ -834,11 +835,23 @@ var _ = DevSpaceDescribe("sync", func() {
834835
// check that included file was not synced
835836
framework.ExpectRemoteFileNotFound("alpine", ns, "/app/syncme/file.txt")
836837

837-
// write a file and check that it got synced
838+
// Keep writing until the sync watcher observes a local change. This avoids
839+
// racing the first write against watcher startup in slower CI environments.
838840
payload := randutil.GenerateRandomString(10000)
839-
err = os.WriteFile(filepath.Join(tempDir, "watching.txt"), []byte(payload), 0666)
841+
err = wait.PollUntilContextTimeout(context.TODO(), time.Second, time.Minute*2, true, func(_ context.Context) (done bool, err error) {
842+
err = os.WriteFile(filepath.Join(tempDir, "watching.txt"), []byte(payload), 0666)
843+
if err != nil {
844+
return false, err
845+
}
846+
847+
out, err := kubeClient.ExecByImageSelector("alpine", ns, []string{"cat", "/app/watching.txt"})
848+
if err != nil {
849+
return false, nil
850+
}
851+
852+
return strings.TrimSpace(out) == strings.TrimSpace(payload), nil
853+
})
840854
framework.ExpectNoError(err)
841-
framework.ExpectRemoteFileContents("alpine", ns, "/app/watching.txt", payload)
842855

843856
// stop command
844857
stop()

0 commit comments

Comments
 (0)