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

Fix skip update mechanism #180

Merged
merged 1 commit into from
Feb 26, 2024
Merged
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
6 changes: 3 additions & 3 deletions internal/tester.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,6 @@ func (t *tester) prepareConfig() (*config.TestCase, []config.Resource, error) {
return nil, nil, errors.Wrapf(err, "cannot unmarshal JSON object: %s", updateParameter)
}
example.UpdateAssertKey, example.UpdateAssertValue = convertToJSONPath(data, "")
} else {
tc.SkipUpdate = true
}
disableImport, ok := annotations[config.AnnotationKeyDisableImport]
if ok && disableImport == "true" {
Expand All @@ -152,8 +150,10 @@ func (t *tester) prepareConfig() (*config.TestCase, []config.Resource, error) {
if disableImport == "true" {
tc.SkipImport = true
}
if updateParameter == "" {
Copy link
Contributor

@ulucinar ulucinar Feb 21, 2024

Choose a reason for hiding this comment

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

Does an uptest.upbound.io/disable-import annotation on a dependency resource of an example manifest has any effect?

Copy link
Member Author

Choose a reason for hiding this comment

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

The update is for only root resources now. But import for every resource in the manifest. So, the disable-import has an effect on the dependency resources.

tc.SkipUpdate = true
}
example.Root = true

}
}

Expand Down
Loading