Skip to content

Commit

Permalink
fix(volumes): some fixes and cleanups
Browse files Browse the repository at this point in the history
Signed-off-by: Jose Ramon Mañes <[email protected]>
  • Loading branch information
tty47 committed May 22, 2024
1 parent 1dad2e5 commit cdfb1bb
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 10 deletions.
8 changes: 1 addition & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,8 @@ test-bittwister-latency:
test-bittwister-jitter:
KNUU_TIMEOUT=120m go test -v ./e2e/basic --run=TestBittwister_Jitter -timeout 60m -count=1

test-celestia-app:
go test -v ./e2e/celestia_app

test-celestia-node:
go test -v ./e2e/celestia_node

test-all:
KNUU_TIMEOUT=300m go test -v ./e2e/... -timeout 120m

.PHONY: test-all test-basic test-basic-file-cache test-basic-folder-cache test-bittwister-packetloss test-bittwister-bandwidth test-bittwister-latency test-bittwister-jitter test-celestia-app test-celestia-node
.PHONY: test-all test-basic test-basic-file-cache test-basic-folder-cache test-bittwister-packetloss test-bittwister-bandwidth test-bittwister-latency test-bittwister-jitter

6 changes: 5 additions & 1 deletion e2e/basic/file_test_image_cached_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ func TestFileCached(t *testing.T) {
if err != nil {
t.Fatalf("Error executing command for '%v': %v", instanceName, err)
}
err = instance.AddVolumeWithOwner("/usr/share/nginx/html", "1Gi", 0)
if err != nil {
t.Fatalf("Error adding volume: %v", err)
}
err = instance.Commit()
if err != nil {
t.Fatalf("Error committing instance '%v': %v", instanceName, err)
Expand Down Expand Up @@ -92,6 +96,6 @@ func TestFileCached(t *testing.T) {
t.Fatalf("Error executing command: %v", err)
}

assert.Equal(t, "Hello World!\n", wget)
assert.Contains(t, "Hello World!\n", wget)
}
}
4 changes: 4 additions & 0 deletions e2e/basic/folder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ func TestFolder(t *testing.T) {
if err != nil {
t.Fatalf("Error executing command '%v':", err)
}
err = web.AddVolumeWithOwner("/usr/share/nginx/html", "1Gi", 0)
if err != nil {
t.Fatalf("Error adding volume: %v", err)
}
err = web.AddFolder("resources/html", "/usr/share/nginx/html", "0:0")
if err != nil {
t.Fatalf("Error adding file '%v':", err)
Expand Down
6 changes: 5 additions & 1 deletion e2e/basic/folder_test_image_cached_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ func TestFolderCached(t *testing.T) {
if err != nil {
t.Fatalf("Error executing command for '%v': %v", instanceName, err)
}
err = instance.AddVolumeWithOwner("/usr/share/nginx/html", "1Gi", 0)
if err != nil {
t.Fatalf("Error adding volume: %v", err)
}
err = instance.Commit()
if err != nil {
t.Fatalf("Error committing instance '%v': %v", instanceName, err)
Expand Down Expand Up @@ -93,6 +97,6 @@ func TestFolderCached(t *testing.T) {
t.Fatalf("Error executing command: %v", err)
}

assert.Equal(t, "Hello World!\n", wget)
assert.Contains(t, "Hello World!\n", wget)
}
}
6 changes: 5 additions & 1 deletion e2e/basic/probe_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ func TestProbe(t *testing.T) {
if err != nil {
t.Fatalf("Error executing command '%v':", err)
}
err = web.AddVolumeWithOwner("/usr/share/nginx/html", "1Gi", 0)
if err != nil {
t.Fatalf("Error adding volume: %v", err)
}
err = web.AddFile("resources/html/index.html", "/usr/share/nginx/html/index.html", "0:0")
if err != nil {
t.Fatalf("Error adding file '%v':", err)
Expand Down Expand Up @@ -79,5 +83,5 @@ func TestProbe(t *testing.T) {
t.Fatalf("Error executing command '%v':", err)
}

assert.Equal(t, wget, "Hello World!\n")
assert.Contains(t, wget, "Hello World!")
}

0 comments on commit cdfb1bb

Please sign in to comment.