-
Notifications
You must be signed in to change notification settings - Fork 13
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 team resource #139
Add team resource #139
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what about tests for multiple teams with the same name?
api returns nothing for the id?
all the errors we should add t.Run
for them
|
||
func resourceTeamImport(ctx context.Context, d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { | ||
id := d.Id() | ||
var getErr diag.Diagnostics |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why you need this instead of returning nil, err
?
i mean if uuidErr
is nil then we don't need to make another if
why not just return? same for the else
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand what you mean. 🤙🏻
You mean in import? We currently don't have tests for imports (doesn't seem like the current framework supports it)
This is something we never addressed in our code. We could throw an error in such a case. Not sure it's that important though
The thing is that the tests aren't really unit tests. So testing those isn't nice (you need to mock exact amount of previous calls) |
I mean you are throwing errors such as
I pretty sure we do that, we have stuff like |
@eranelbaz I know we do that sometimes. I'm just not sure it's worth the effort |
Added tests for all but |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Issue & Steps to Reproduce / Feature Request
Feature Request: Support team resource
Solution
Support team resource with two attributes: name and description.
Add tests