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

Fixed: Error with the Import Filter not validating before Importing/Reading #22

Merged
merged 4 commits into from
Jun 20, 2019

Conversation

xescugc
Copy link
Member

@xescugc xescugc commented Jun 20, 2019

We had an error when -i had a wrong resource, it would start importing anyway and then crash when trying to import this resource. Now a check prior importing is done to ensure resources are all valid

errcode/codes.go Outdated
@@ -4,6 +4,7 @@ import "errors"

// List of all the error Codes used
var (
ErrProviderResourceNotSupported = errors.New("the resource type it's not supported")
Copy link
Contributor

Choose a reason for hiding this comment

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

is not*

@@ -300,4 +304,27 @@ func TestImport(t *testing.T) {
err := provider.Import(ctx, p, hw, sw, f)
require.NoError(t, err)
})
t.Run("ErrorWithIncorrectFiler", func(t *testing.T) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Filter*

…to fetch them

This way if some of the resources are not valid it'll just fail before start fetching the resources and fail
without importing anything.
@xescugc xescugc merged commit e8f2559 into master Jun 20, 2019
@xescugc xescugc deleted the fg-include branch June 20, 2019 10:16
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.

None yet

2 participants