Skip to content

Commit

Permalink
Update E2E versions to 1.5.0 (#831)
Browse files Browse the repository at this point in the history
* Fix upgrade paths to 1.5.0 runtime

* Update tests/e2e/standalone/standalone_test.go

* Update tests/e2e/standalone/standalone_test.go

* Update tests/e2e/standalone/standalone_test.go

* Update tests/e2e/standalone/standalone_test.go

Co-authored-by: Bernd Verst <[email protected]>
  • Loading branch information
mukundansundar and berndverst authored Nov 12, 2021
1 parent 99cb9c1 commit de0d2a4
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 17 deletions.
4 changes: 2 additions & 2 deletions tests/e2e/kubernetes/kubernetes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ import (
)

const (
currentRuntimeVersion = "1.5.0-rc.3"
currentDashboardVersion = "0.9.0-rc.1"
currentRuntimeVersion = "1.5.0"
currentDashboardVersion = "0.9.0"
)

var currentVersionDetails = common.VersionDetails{
Expand Down
31 changes: 18 additions & 13 deletions tests/e2e/standalone/standalone_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,16 @@ import (
)

const (
daprRuntimeVersion = "1.4.0"
daprDashboardVersion = "0.8.0"
daprRuntimeVersion = "1.5.0"
daprDashboardVersion = "0.9.0"
)

var socketCases = []string{"", "/tmp"}
// Removing unix domain socket tests till shutdown API with unix domain sockets is fixed.
// https://github.com/dapr/dapr/issues/3894
var socketCases = []string{""}

func TestStandaloneInstall(t *testing.T) {
// Ensure a clean environment
// Ensure a clean environment.
uninstall()

tests := []struct {
Expand Down Expand Up @@ -248,7 +250,10 @@ func testInstall(t *testing.T) {
return
}
output = strings.TrimSpace(output)
if !assert.Equal(t, version, output) {
// Changing version check since there is a log that is output on daprd --version
// 2021/11/12 11:10:38 maxprocs: Leaving GOMAXPROCS=12: CPU quota undefined
// before the version is output
if !assert.Contains(t, output, version) {
return
}
delete(binaries, bin)
Expand Down Expand Up @@ -377,14 +382,14 @@ func testRun(t *testing.T) {
assert.Contains(t, output, "Exited Dapr successfully")
})

t.Run("API shutdown with socket", func(t *testing.T) {
// Test that the CLI exits on a daprd shutdown.
output, err := spawn.Command(daprPath, "run", "--app-id", "testapp", "--unix-domain-socket", "/tmp", "--", "bash", "-c", "curl --unix-socket /tmp/dapr-testapp-http.socket -v -X POST http://unix/v1.0/shutdown; sleep 10; exit 1")
t.Log(output)
require.NoError(t, err, "run failed")
assert.Contains(t, output, "Exited App successfully", "App should be shutdown before it has a chance to return non-zero")
assert.Contains(t, output, "Exited Dapr successfully")
})
// t.Run("API shutdown with socket", func(t *testing.T) {
// // Test that the CLI exits on a daprd shutdown.
// output, err := spawn.Command(daprPath, "run", "--app-id", "testapp", "--unix-domain-socket", "/tmp", "--", "bash", "-c", "curl --unix-socket /tmp/dapr-testapp-http.socket -v -X POST http://unix/v1.0/shutdown; sleep 10; exit 1")
// t.Log(output)
// require.NoError(t, err, "run failed")
// assert.Contains(t, output, "Exited App successfully", "App should be shutdown before it has a chance to return non-zero")
// assert.Contains(t, output, "Exited Dapr successfully")
// })
}

func executeAgainstRunningDapr(t *testing.T, f func(), daprArgs ...string) {
Expand Down
21 changes: 19 additions & 2 deletions tests/e2e/upgrade/upgrade_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,25 @@ var supportedUpgradePaths = []upgradePath{
CustomResourceDefs: []string{"components.dapr.io", "configurations.dapr.io", "subscriptions.dapr.io"},
},
next: common.VersionDetails{
RuntimeVersion: "1.5.0-rc.3",
DashboardVersion: "0.9.0-rc.1",
RuntimeVersion: "1.5.0",
DashboardVersion: "0.9.0",
ClusterRoles: []string{"dapr-operator-admin", "dashboard-reader"},
ClusterRoleBindings: []string{"dapr-operator", "dapr-role-tokenreview-binding", "dashboard-reader-global"},
CustomResourceDefs: []string{"components.dapr.io", "configurations.dapr.io", "subscriptions.dapr.io"},
},
},
// test downgrade
{
previous: common.VersionDetails{
RuntimeVersion: "1.5.0",
DashboardVersion: "0.9.0",
ClusterRoles: []string{"dapr-operator-admin", "dashboard-reader"},
ClusterRoleBindings: []string{"dapr-operator", "dapr-role-tokenreview-binding", "dashboard-reader-global"},
CustomResourceDefs: []string{"components.dapr.io", "configurations.dapr.io", "subscriptions.dapr.io"},
},
next: common.VersionDetails{
RuntimeVersion: "1.4.3",
DashboardVersion: "0.8.0",
ClusterRoles: []string{"dapr-operator-admin", "dashboard-reader"},
ClusterRoleBindings: []string{"dapr-operator", "dapr-role-tokenreview-binding", "dashboard-reader-global"},
CustomResourceDefs: []string{"components.dapr.io", "configurations.dapr.io", "subscriptions.dapr.io"},
Expand Down

0 comments on commit de0d2a4

Please sign in to comment.