terraform-provider-github icon indicating copy to clipboard operation
terraform-provider-github copied to clipboard

Fix github_team_members: Support github_team_members role edits

Open csainty opened this issue 3 years ago • 3 comments

When a member's role is changed, only the delete operation is run. The code clearly sets both delete and create on lines 140:141, but then uses continue to loop the iteration after running just one of them.

From what I can work out, the test case already checks this and is failing. I have therefore left it unchanged and it should start passing.

I say should because in my local environment I had to edit the test to not mess with org membership, otherwise my collaborator account was pending invitation to the org and failing the test because of that. I am thinking your test setup approves those invitations automatically. With that change made this PR takes the test from FAIL to PASS for me.

csainty avatar Jul 08 '22 01:07 csainty

@stawik-mesa as the original author, are you willing to check my thinking here and confirm what I am seeing? 🙏

csainty avatar Jul 17 '22 23:07 csainty

@csainty I think you are right. Probably I had not enough sleep at the time I implemented it.

stawik-mesa avatar Jul 19 '22 12:07 stawik-mesa

I think you are right. Probably I had not enough sleep at the time I implemented it.

Don't beat yourself up, simple mistake.

Now let's tag @jcudit and @kfcampbell as the original approvers and see if they can weigh in.

csainty avatar Jul 19 '22 23:07 csainty

I've been able to reproduce the failure and subsequent test passing following @csainty's advice locally. I do not believe that the integration tests are being run correctly in CI. I'll get this merged shortly and released soon, and prioritize work on our integration testing setup.

kfcampbell avatar Aug 23 '22 23:08 kfcampbell