Skip to content

Commit

Permalink
Revert "Fix tests running master in CI with specific dapr version"
Browse files Browse the repository at this point in the history
This reverts commit a02c81f.
  • Loading branch information
antontroshin committed Nov 7, 2024
1 parent c652b7c commit 73e3359
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 22 deletions.
1 change: 0 additions & 1 deletion tests/e2e/common/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ type VersionDetails struct {
ClusterRoles []string
ClusterRoleBindings []string
UseDaprLatestVersion bool
HasScheduler bool
}

type TestOptions struct {
Expand Down
12 changes: 2 additions & 10 deletions tests/e2e/kubernetes/clean_env.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,6 @@ var (
// ensureCleanEnv function needs to be called in every Test function.
// sets necessary variable values and uninstalls any previously installed `dapr`.
func ensureCleanEnv(t *testing.T, useDaprLatestVersion bool) {
ensureEnvVersionSet(t, useDaprLatestVersion)
// Ensure a clean environment
common.EnsureUninstall(true, true) // does not wait for pod deletion
}

func ensureEnvVersionSet(t *testing.T, useDaprLatestVersion bool) {
currentRuntimeVersion, currentDashboardVersion = common.GetVersionsFromEnv(t, useDaprLatestVersion)

currentVersionDetails = common.VersionDetails{
Expand All @@ -58,8 +52,6 @@ func ensureEnvVersionSet(t *testing.T, useDaprLatestVersion bool) {
currentVersionDetails.ClusterRoles = clusterRoles1_10_X
currentVersionDetails.ClusterRoleBindings = clusterRoleBindings1_10_X
}

if strings.HasPrefix(currentRuntimeVersion, "1.14.") {
currentVersionDetails.HasScheduler = true
}
// Ensure a clean environment
common.EnsureUninstall(true, true) // does not wait for pod deletion
}
15 changes: 4 additions & 11 deletions tests/e2e/standalone/run_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import (

func TestStandaloneRun(t *testing.T) {
ensureDaprInstallation(t)
ensureEnvVersionSet(t, false)

ctx, cancelFunc := context.WithCancel(context.Background())
defer cancelFunc()
Expand All @@ -36,11 +35,9 @@ func TestStandaloneRun(t *testing.T) {
output, err := cmdProcess(ctx, "placement", t.Log, "--metrics-port", "9091", "--healthz-port", "8081")
require.NoError(t, err)
t.Log(output)
if currentVersionDetails.HasScheduler {
output, err = cmdProcess(ctx, "scheduler", t.Log, "--metrics-port", "9092", "--healthz-port", "8082")
require.NoError(t, err)
t.Log(output)
}
output, err = cmdProcess(ctx, "scheduler", t.Log, "--metrics-port", "9092", "--healthz-port", "8082")
require.NoError(t, err)
t.Log(output)
}
t.Cleanup(func() {
// remove dapr installation after all tests in this function.
Expand Down Expand Up @@ -71,11 +68,7 @@ func TestStandaloneRun(t *testing.T) {
output, err := cmdRun(path, "--dapr-internal-grpc-port", "9999", "--", "bash", "-c", "echo test")
t.Log(output)
require.NoError(t, err, "run failed")
if currentVersionDetails.HasScheduler {
assert.Contains(t, output, "Internal gRPC server is running on :9999")
} else {
assert.Contains(t, output, "Internal gRPC server is running on port 9999")
}
assert.Contains(t, output, "Internal gRPC server is running on :9999")
assert.Contains(t, output, "Exited App successfully")
assert.Contains(t, output, "Exited Dapr successfully")
assert.NotContains(t, output, "Could not update sidecar metadata for cliPID")
Expand Down

0 comments on commit 73e3359

Please sign in to comment.