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

Add ODH CFO test specific support functions #9

Merged
merged 1 commit into from
Nov 10, 2023

Conversation

sutaakar
Copy link
Contributor

@sutaakar sutaakar commented Nov 1, 2023

Issue link

red-hat-data-services/distributed-workloads#23

What changes have been made

Add test support functions needed by ODH CFO tests.

Verification steps

N/A

Checks

  • I've made sure the tests are passing.
  • Testing Strategy
    • Unit tests
    • Manual tests
    • Testing is not required for this change

Copy link
Collaborator

@astefanutti astefanutti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a small comment, otherwise LGTM.

support/core.go Outdated
@@ -98,7 +101,10 @@ func storeContainerLog(t Test, namespace *corev1.Namespace, podName, containerNa

options := corev1.PodLogOptions{Container: containerName}
stream, err := t.Client().Core().CoreV1().Pods(namespace.Name).GetLogs(podName, &options).Stream(t.Ctx())
t.Expect(err).NotTo(gomega.HaveOccurred())
if err != nil {
t.T().Logf("Pod Container %s/%s/%s not found, logs cannot be stored", namespace.Name, podName, containerName)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is more likely to fail when the Pod is still in pending phase, rather than because the container cannot be found. A more generic message may be better suited not to be misleading.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adjusted wording.
I suppose it doesn't have sense to print the error, considering that this is not a test failure.

@sutaakar sutaakar merged commit 5463537 into project-codeflare:main Nov 10, 2023
2 checks passed
@sutaakar sutaakar deleted the odh-cfo-test branch November 10, 2023 08:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants