Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate PostgreSQL Scaler e2e test to Go #3370

Merged
merged 6 commits into from
Jul 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions tests/helper/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,22 @@ func ExecCommandOnSpecificPod(t *testing.T, podName string, namespace string, co
return out, errOut, err
}

func WaitForSuccessfulExecCommandOnSpecificPod(t *testing.T, podName string, namespace string, command string, iterations, intervalSeconds int) (bool, string, string, error) {
var out, errOut string
var err error
for i := 0; i < iterations; i++ {
out, errOut, err = ExecCommandOnSpecificPod(t, podName, namespace, command)
t.Logf("Waiting for successful execution of command on Pod; Output: %s, Error: %s", out, errOut)
if err == nil {
return true, out, errOut, err
}

time.Sleep(time.Duration(intervalSeconds) * time.Second)
}

return false, out, errOut, err
}

func GetKubernetesClient(t *testing.T) *kubernetes.Clientset {
if KubeClient != nil && KubeConfig != nil {
return KubeClient
Expand Down
238 changes: 0 additions & 238 deletions tests/scalers/postgresql.test.ts

This file was deleted.

Loading