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

New structural changes to test repo #531

Merged
merged 7 commits into from
Feb 7, 2022

Conversation

nitishSr
Copy link
Contributor

@nitishSr nitishSr commented Jan 12, 2022

This PR tries to introduce new structure for organising test repo as per below structure -

.
└── oadp-operator/
    └── tests/
        └── e2e/
            ├── templates/
            │   ├── velero_bsl_template.tmpl
            │   └── credentials
            ├── lib/
            │   ├── kube_helpers.go
            │   └── velero_helpers.go
            ├── utils/
            │   └── common.go
              velero_deployment_suite_test.go
              bsl_suite_test.go
              vsl_suite_test.go
              e2e_suite_test.go

@openshift-ci openshift-ci bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jan 12, 2022
@openshift-ci
Copy link

openshift-ci bot commented Jan 12, 2022

Hi @nitishSr. Thanks for your PR.

I'm waiting for a openshift member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@dymurray
Copy link
Member

@nitishSr I like the structural changes, LGTM. Let me know when this is ready for review

@openshift-ci openshift-ci bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 16, 2022
@openshift-ci openshift-ci bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 27, 2022
@codecov-commenter
Copy link

codecov-commenter commented Feb 2, 2022

Codecov Report

Merging #531 (5c8dc34) into master (816cb83) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #531   +/-   ##
=======================================
  Coverage   38.32%   38.32%           
=======================================
  Files          13       13           
  Lines        2839     2839           
=======================================
  Hits         1088     1088           
  Misses       1671     1671           
  Partials       80       80           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fbab17b...5c8dc34. Read the comment docs.

@nitishSr nitishSr changed the title [WIP] New structural changes to test repo New structural changes to test repo Feb 2, 2022
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 2, 2022
@dymurray
Copy link
Member

dymurray commented Feb 2, 2022

/ok-to-test

@openshift-ci openshift-ci bot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Feb 2, 2022
@openshift-ci openshift-ci bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 4, 2022
@nitishSr
Copy link
Contributor Author

nitishSr commented Feb 4, 2022

/retest

1 similar comment
@nitishSr
Copy link
Contributor Author

nitishSr commented Feb 4, 2022

/retest

@openshift-ci
Copy link

openshift-ci bot commented Feb 4, 2022

@nitishSr: all tests passed!

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

Copy link
Member

@shubham-pampattiwar shubham-pampattiwar left a comment

Choose a reason for hiding this comment

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

@nitishSr +1 on the refactoring, just added one question, else LGTM.

@@ -1,4 +1,4 @@
package e2e
package e2e_test
Copy link
Member

Choose a reason for hiding this comment

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

qq: Is the name change intentional or accidental ? The PR description does not mention about e2e_test package #531 (comment)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@shubham-pampattiwar yes that is intentional change. Just wanted to be more specific here, to reflect that its a test package (taken as reference from Ginkgo docs)

@kaovilai
Copy link
Member

kaovilai commented Feb 4, 2022

+1
I think exporting functions would allow folks to reuse our e2e functions elsewhere.

"io/ioutil"
)

func ReadFile(path string) ([]byte, error) {
Copy link
Member

Choose a reason for hiding this comment

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

I think we can remove this? This function doesn't do anything. Can remove later after merge. Thoughts?

Copy link
Member

Choose a reason for hiding this comment

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

I see elsewhere we are using os.ReadFile as well which seems to do the same thing.

Copy link
Member

Choose a reason for hiding this comment

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

Looks like os.ReadFile is more direct over io/ioutil now... at least from reading https://pkg.go.dev/io/ioutil@go1.17.6#ReadFile

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@kaovilai I do think the same. I just kept it as it is, considering these changes were made by some earlier PR. I can definitely try to replace it altogether with os.ReadFile() if possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ok-to-test Indicates a non-member PR verified by an org member that is safe to test.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants