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

Expand testing to cover G Suite functionality #111

Open
morgante opened this issue Jan 15, 2019 · 6 comments
Open

Expand testing to cover G Suite functionality #111

morgante opened this issue Jan 15, 2019 · 6 comments
Assignees
Labels
enhancement New feature or request triaged Scoped and ready for work

Comments

@morgante
Copy link
Contributor

The tests currently don't make it easy to test G Suite-related functionality in the module.

We should add fixtures to consistently exercise the create_group and API/SA group functionalities.

@morgante
Copy link
Contributor Author

We also need tests covering the various scenarios documented here.

thefirstofthe300 added a commit to thefirstofthe300/terraform-google-project-factory that referenced this issue Feb 20, 2019
thefirstofthe300 added a commit to thefirstofthe300/terraform-google-project-factory that referenced this issue Feb 20, 2019
thefirstofthe300 added a commit to thefirstofthe300/terraform-google-project-factory that referenced this issue Feb 20, 2019
thefirstofthe300 added a commit to thefirstofthe300/terraform-google-project-factory that referenced this issue Feb 21, 2019
thefirstofthe300 added a commit to thefirstofthe300/terraform-google-project-factory that referenced this issue Feb 21, 2019
thefirstofthe300 added a commit to thefirstofthe300/terraform-google-project-factory that referenced this issue Feb 21, 2019
thefirstofthe300 added a commit to thefirstofthe300/terraform-google-project-factory that referenced this issue Feb 21, 2019
thefirstofthe300 added a commit to thefirstofthe300/terraform-google-project-factory that referenced this issue Feb 21, 2019
thefirstofthe300 added a commit to thefirstofthe300/terraform-google-project-factory that referenced this issue Feb 22, 2019
thefirstofthe300 added a commit to thefirstofthe300/terraform-google-project-factory that referenced this issue Feb 25, 2019
thefirstofthe300 added a commit to thefirstofthe300/terraform-google-project-factory that referenced this issue Feb 25, 2019
@thefirstofthe300
Copy link
Contributor

Just to reiterate, the scenarios that need to be tested are:

  • Pass in a group_name, and create_group = false => grant the roles to the group
  • Pass in a group_name and create_group = true => create the given group name and grant it the required roles
  • Don't pass in a group_name and create_group = true => creates a group named project_name-editors and grants it the required roles.
  • Don't pass in a group_name and create_group = false => no group roles granted

Also

  • Pass in sa_group => default service account is part of given G Suite group

@aaron-lane aaron-lane added the enhancement New feature or request label May 27, 2019
@aaron-lane
Copy link
Contributor

We will need to alter the test setup to support a long-lived service account, or identify an alternative approach to satisfy the authentication requirements of the G Suite provider.

@aaron-lane aaron-lane added the triaged Scoped and ready for work label Nov 18, 2019
@morgante
Copy link
Contributor Author

morgante commented Nov 19, 2019

Here's how I suggest we tackle this:

  • In the test-org, create a new folder+project for project-factory that includes creating a service account and applies the correct permissions, roughly mirroring the existing setup/ content
  • In the setup/ stage of this repo, remove the project creation and and simply use google_service_account_key to grab the key from the pre-created service account

@aaron-lane
Copy link
Contributor

I think that sounds like a good approach. I suggest that we maintain the setup configuration so contributors can continue to easily create a test environment for the minimal suite, and push the exceptional logic in to the build configuration file. May be add a separate "full-ci-setup" configuration which does what you propose.

@morgante
Copy link
Contributor Author

Sure, we could have a separate folder which behaves similarly but is only used for CI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request triaged Scoped and ready for work
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants