8000 Restoring utils.ErrExit in config tests by makalaaneesh · Pull Request #2681 · yugabyte/yb-voyager · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Restoring utils.ErrExit in config tests #2681

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

makalaaneesh
Copy link
Collaborator

Describe the changes in this pull request

To avoid validation errors, we override utils.ErrExit.
This PR ensures that the utils.ErrExit is restored after the test, or else it's possible that subsequent test failures are not caught.

Describe if there are any user-facing changes

How was this pull request tested?

Does your PR have changes in callhome/yugabyted payloads? If so, is the payload version incremented?

Does your PR have ch 8000 anges that can cause upgrade issues?

Component Breaking changes?
MetaDB Yes/No
Name registry json Yes/No
Data File Descriptor Json Yes/No
Export Snapshot Status Json Yes/No
Import Data State Yes/No
Export Status Json Yes/No
Data .sql files of tables Yes/No
Export and import data queue Yes/No
Schema Dump Yes/No
AssessmentDB Yes/No
Sizing DB Yes/No
Migration Assessment Report Json Yes/No
Callhome Json Yes/No
YugabyteD Tables Yes/No
TargetDB Metadata Tables Yes/No

@@ -64,6 +67,7 @@ func resetFlags(cmd *cobra.Command) {
f.Value.Set(f.DefValue)
f.Changed = false
})
utils.ErrExit = originalErrExit
Copy link
Contributor

Choose a reason for hiding this comment

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

Are we sure resetCmdAndEnvVars and resetFlags are used together can we merge these functions, to also ensure that we change and restore the errExit in a single place?

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
0