Skip to content

Commit

Permalink
test: delayed checking Seed Peer download content (#3230)
Browse files Browse the repository at this point in the history
Signed-off-by: Gaius <[email protected]>
  • Loading branch information
gaius-qi authored Apr 25, 2024
1 parent 01d13cb commit 91b9145
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 5 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/compatibility-e2e-v2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,9 @@ jobs:
- name: Setup dragonfly
run: |
helm install --wait --timeout 10m --dependency-update --create-namespace --namespace dragonfly-system --set ${{ matrix.chart-name }}.image.tag=${{ matrix.image-tag }} --set ${{ matrix.chart-name }}.image.repository=dragonflyoss/${{ matrix.image }} -f ${{ env.DRAGONFLY_CHARTS_CONFIG_PATH }} dragonfly ${{ env.DRAGONFLY_CHARTS_PATH }}
helm install --wait --timeout 15m --dependency-update --create-namespace --namespace dragonfly-system --set ${{ matrix.chart-name }}.image.tag=${{ matrix.image-tag }} --set ${{ matrix.chart-name }}.image.repository=dragonflyoss/${{ matrix.image }} -f ${{ env.DRAGONFLY_CHARTS_CONFIG_PATH }} dragonfly ${{ env.DRAGONFLY_CHARTS_PATH }}
kubectl apply -f ${{ env.DRAGONFLY_FILE_SERVER_PATH }}
kubectl wait po file-server-0 --namespace dragonfly-e2e --for=condition=ready --timeout=10m
kubectl get po -n dragonfly-system
- name: Run E2E test
run: |
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/e2e-v2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,9 @@ jobs:
- name: Setup dragonfly
run: |
helm install --wait --timeout 10m --dependency-update --create-namespace --namespace dragonfly-system -f ${{ matrix.charts-config }} dragonfly ${{ env.DRAGONFLY_CHARTS_PATH }}
helm install --wait --timeout 15m --dependency-update --create-namespace --namespace dragonfly-system -f ${{ matrix.charts-config }} dragonfly ${{ env.DRAGONFLY_CHARTS_PATH }}
kubectl apply -f ${{ env.DRAGONFLY_FILE_SERVER_PATH }}
kubectl wait po file-server-0 --namespace dragonfly-e2e --for=condition=ready --timeout=10m
kubectl get po -n dragonfly-system
- name: Run E2E test
run: |
Expand Down
5 changes: 5 additions & 0 deletions test/e2e/v2/containerd_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package e2e

import (
"fmt"
"time"

. "github.com/onsi/ginkgo/v2" //nolint
. "github.com/onsi/gomega" //nolint
Expand Down Expand Up @@ -68,6 +69,7 @@ var _ = Describe("Containerd with CRI support", func() {
Expect(taskMetadata.Sha256).To(Equal(sha256sum))
}

time.Sleep(1 * time.Second)
seedClientPods := make([]*util.PodExec, 3)
for i := 0; i < 3; i++ {
seedClientPods[i], err = util.SeedClientExec(i)
Expand Down Expand Up @@ -123,6 +125,7 @@ var _ = Describe("Containerd with CRI support", func() {
Expect(taskMetadata.Sha256).To(Equal(sha256sum))
}

time.Sleep(1 * time.Second)
seedClientPods := make([]*util.PodExec, 3)
for i := 0; i < 3; i++ {
seedClientPods[i], err = util.SeedClientExec(i)
Expand Down Expand Up @@ -186,6 +189,7 @@ var _ = Describe("Containerd with CRI support", func() {
Expect(taskMetadata.Sha256).To(Equal(sha256sum))
}

time.Sleep(1 * time.Second)
seedClientPods := make([]*util.PodExec, 3)
for i := 0; i < 3; i++ {
seedClientPods[i], err = util.SeedClientExec(i)
Expand Down Expand Up @@ -237,6 +241,7 @@ var _ = Describe("Containerd with CRI support", func() {
Expect(taskMetadata.Sha256).To(Equal(sha256sum))
}

time.Sleep(1 * time.Second)
seedClientPods := make([]*util.PodExec, 3)
for i := 0; i < 3; i++ {
seedClientPods[i], err = util.SeedClientExec(i)
Expand Down
13 changes: 13 additions & 0 deletions test/e2e/v2/dfget_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package e2e

import (
"fmt"
"time"

. "github.com/onsi/ginkgo/v2" //nolint
. "github.com/onsi/gomega" //nolint
Expand Down Expand Up @@ -50,6 +51,7 @@ var _ = Describe("Download Using Dfget", func() {
Expect(err).NotTo(HaveOccurred())
Expect(fileMetadata.Sha256).To(Equal(sha256sum))

time.Sleep(1 * time.Second)
seedClientPods := make([]*util.PodExec, 3)
for i := 0; i < 3; i++ {
seedClientPods[i], err = util.SeedClientExec(i)
Expand Down Expand Up @@ -87,6 +89,7 @@ var _ = Describe("Download Using Dfget", func() {
Expect(err).NotTo(HaveOccurred())
Expect(fileMetadata.Sha256).To(Equal(sha256sum))

time.Sleep(1 * time.Second)
seedClientPods := make([]*util.PodExec, 3)
for i := 0; i < 3; i++ {
seedClientPods[i], err = util.SeedClientExec(i)
Expand Down Expand Up @@ -124,6 +127,7 @@ var _ = Describe("Download Using Dfget", func() {
Expect(err).NotTo(HaveOccurred())
Expect(fileMetadata.Sha256).To(Equal(sha256sum))

time.Sleep(1 * time.Second)
seedClientPods := make([]*util.PodExec, 3)
for i := 0; i < 3; i++ {
seedClientPods[i], err = util.SeedClientExec(i)
Expand Down Expand Up @@ -161,6 +165,7 @@ var _ = Describe("Download Using Dfget", func() {
Expect(err).NotTo(HaveOccurred())
Expect(fileMetadata.Sha256).To(Equal(sha256sum))

time.Sleep(1 * time.Second)
seedClientPods := make([]*util.PodExec, 3)
for i := 0; i < 3; i++ {
seedClientPods[i], err = util.SeedClientExec(i)
Expand Down Expand Up @@ -198,6 +203,7 @@ var _ = Describe("Download Using Dfget", func() {
Expect(err).NotTo(HaveOccurred())
Expect(fileMetadata.Sha256).To(Equal(sha256sum))

time.Sleep(1 * time.Second)
seedClientPods := make([]*util.PodExec, 3)
for i := 0; i < 3; i++ {
seedClientPods[i], err = util.SeedClientExec(i)
Expand Down Expand Up @@ -235,6 +241,7 @@ var _ = Describe("Download Using Dfget", func() {
Expect(err).NotTo(HaveOccurred())
Expect(fileMetadata.Sha256).To(Equal(sha256sum))

time.Sleep(1 * time.Second)
seedClientPods := make([]*util.PodExec, 3)
for i := 0; i < 3; i++ {
seedClientPods[i], err = util.SeedClientExec(i)
Expand Down Expand Up @@ -272,6 +279,7 @@ var _ = Describe("Download Using Dfget", func() {
Expect(err).NotTo(HaveOccurred())
Expect(fileMetadata.Sha256).To(Equal(sha256sum))

time.Sleep(1 * time.Second)
seedClientPods := make([]*util.PodExec, 3)
for i := 0; i < 3; i++ {
seedClientPods[i], err = util.SeedClientExec(i)
Expand Down Expand Up @@ -309,6 +317,7 @@ var _ = Describe("Download Using Dfget", func() {
Expect(err).NotTo(HaveOccurred())
Expect(fileMetadata.Sha256).To(Equal(sha256sum))

time.Sleep(1 * time.Second)
seedClientPods := make([]*util.PodExec, 3)
for i := 0; i < 3; i++ {
seedClientPods[i], err = util.SeedClientExec(i)
Expand Down Expand Up @@ -346,6 +355,7 @@ var _ = Describe("Download Using Dfget", func() {
Expect(err).NotTo(HaveOccurred())
Expect(fileMetadata.Sha256).To(Equal(sha256sum))

time.Sleep(1 * time.Second)
seedClientPods := make([]*util.PodExec, 3)
for i := 0; i < 3; i++ {
seedClientPods[i], err = util.SeedClientExec(i)
Expand Down Expand Up @@ -383,6 +393,7 @@ var _ = Describe("Download Using Dfget", func() {
Expect(err).NotTo(HaveOccurred())
Expect(fileMetadata.Sha256).To(Equal(sha256sum))

time.Sleep(1 * time.Second)
seedClientPods := make([]*util.PodExec, 3)
for i := 0; i < 3; i++ {
seedClientPods[i], err = util.SeedClientExec(i)
Expand Down Expand Up @@ -420,6 +431,7 @@ var _ = Describe("Download Using Dfget", func() {
Expect(err).NotTo(HaveOccurred())
Expect(fileMetadata.Sha256).To(Equal(sha256sum))

time.Sleep(1 * time.Second)
seedClientPods := make([]*util.PodExec, 3)
for i := 0; i < 3; i++ {
seedClientPods[i], err = util.SeedClientExec(i)
Expand Down Expand Up @@ -457,6 +469,7 @@ var _ = Describe("Download Using Dfget", func() {
Expect(err).NotTo(HaveOccurred())
Expect(fileMetadata.Sha256).To(Equal(sha256sum))

time.Sleep(1 * time.Second)
seedClientPods := make([]*util.PodExec, 3)
for i := 0; i < 3; i++ {
seedClientPods[i], err = util.SeedClientExec(i)
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/v2/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ var _ = BeforeSuite(func() {
rawGitCommit, err := util.GitCommand("rev-parse", "--short", "HEAD").CombinedOutput()
Expect(err).NotTo(HaveOccurred())
gitCommit := strings.Fields(string(rawGitCommit))[0]
fmt.Printf("git merge commit: %s\n", gitCommit)
fmt.Printf("git commit: %s\n", gitCommit)
})

// TestE2E is the root of e2e test function
Expand Down
12 changes: 12 additions & 0 deletions test/e2e/v2/proxy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ var _ = Describe("Download Using Proxy", func() {
Expect(err).NotTo(HaveOccurred())
Expect(fileMetadata.Sha256).To(Equal(sha256sum))

time.Sleep(1 * time.Second)
seedClientPods := make([]*util.PodExec, 3)
for i := 0; i < 3; i++ {
seedClientPods[i], err = util.SeedClientExec(i)
Expand Down Expand Up @@ -88,6 +89,7 @@ var _ = Describe("Download Using Proxy", func() {
Expect(err).NotTo(HaveOccurred())
Expect(fileMetadata.Sha256).To(Equal(sha256sum))

time.Sleep(1 * time.Second)
seedClientPods := make([]*util.PodExec, 3)
for i := 0; i < 3; i++ {
seedClientPods[i], err = util.SeedClientExec(i)
Expand Down Expand Up @@ -125,6 +127,7 @@ var _ = Describe("Download Using Proxy", func() {
Expect(err).NotTo(HaveOccurred())
Expect(fileMetadata.Sha256).To(Equal(sha256sum))

time.Sleep(1 * time.Second)
seedClientPods := make([]*util.PodExec, 3)
for i := 0; i < 3; i++ {
seedClientPods[i], err = util.SeedClientExec(i)
Expand Down Expand Up @@ -162,6 +165,7 @@ var _ = Describe("Download Using Proxy", func() {
Expect(err).NotTo(HaveOccurred())
Expect(fileMetadata.Sha256).To(Equal(sha256sum))

time.Sleep(1 * time.Second)
seedClientPods := make([]*util.PodExec, 3)
for i := 0; i < 3; i++ {
seedClientPods[i], err = util.SeedClientExec(i)
Expand Down Expand Up @@ -199,6 +203,7 @@ var _ = Describe("Download Using Proxy", func() {
Expect(err).NotTo(HaveOccurred())
Expect(fileMetadata.Sha256).To(Equal(sha256sum))

time.Sleep(1 * time.Second)
seedClientPods := make([]*util.PodExec, 3)
for i := 0; i < 3; i++ {
seedClientPods[i], err = util.SeedClientExec(i)
Expand Down Expand Up @@ -236,6 +241,7 @@ var _ = Describe("Download Using Proxy", func() {
Expect(err).NotTo(HaveOccurred())
Expect(fileMetadata.Sha256).To(Equal(sha256sum))

time.Sleep(1 * time.Second)
seedClientPods := make([]*util.PodExec, 3)
for i := 0; i < 3; i++ {
seedClientPods[i], err = util.SeedClientExec(i)
Expand Down Expand Up @@ -273,6 +279,7 @@ var _ = Describe("Download Using Proxy", func() {
Expect(err).NotTo(HaveOccurred())
Expect(fileMetadata.Sha256).To(Equal(sha256sum))

time.Sleep(1 * time.Second)
seedClientPods := make([]*util.PodExec, 3)
for i := 0; i < 3; i++ {
seedClientPods[i], err = util.SeedClientExec(i)
Expand Down Expand Up @@ -310,6 +317,7 @@ var _ = Describe("Download Using Proxy", func() {
Expect(err).NotTo(HaveOccurred())
Expect(fileMetadata.Sha256).To(Equal(sha256sum))

time.Sleep(1 * time.Second)
seedClientPods := make([]*util.PodExec, 3)
for i := 0; i < 3; i++ {
seedClientPods[i], err = util.SeedClientExec(i)
Expand Down Expand Up @@ -347,6 +355,7 @@ var _ = Describe("Download Using Proxy", func() {
Expect(err).NotTo(HaveOccurred())
Expect(fileMetadata.Sha256).To(Equal(sha256sum))

time.Sleep(1 * time.Second)
seedClientPods := make([]*util.PodExec, 3)
for i := 0; i < 3; i++ {
seedClientPods[i], err = util.SeedClientExec(i)
Expand Down Expand Up @@ -384,6 +393,7 @@ var _ = Describe("Download Using Proxy", func() {
Expect(err).NotTo(HaveOccurred())
Expect(fileMetadata.Sha256).To(Equal(sha256sum))

time.Sleep(1 * time.Second)
seedClientPods := make([]*util.PodExec, 3)
for i := 0; i < 3; i++ {
seedClientPods[i], err = util.SeedClientExec(i)
Expand Down Expand Up @@ -421,6 +431,7 @@ var _ = Describe("Download Using Proxy", func() {
Expect(err).NotTo(HaveOccurred())
Expect(fileMetadata.Sha256).To(Equal(sha256sum))

time.Sleep(1 * time.Second)
seedClientPods := make([]*util.PodExec, 3)
for i := 0; i < 3; i++ {
seedClientPods[i], err = util.SeedClientExec(i)
Expand Down Expand Up @@ -458,6 +469,7 @@ var _ = Describe("Download Using Proxy", func() {
Expect(err).NotTo(HaveOccurred())
Expect(fileMetadata.Sha256).To(Equal(sha256sum))

time.Sleep(1 * time.Second)
seedClientPods := make([]*util.PodExec, 3)
for i := 0; i < 3; i++ {
seedClientPods[i], err = util.SeedClientExec(i)
Expand Down

0 comments on commit 91b9145

Please sign in to comment.