quarkiverse / quarkus-azure-services

Quarkus extensions for Azure services
Apache License 2.0
13 stars 17 forks source link

Set up integration tests to run against the real Azure services #108

Closed majguo closed 1 year ago

majguo commented 1 year ago

The PR is to resolve #37 by setting up the integration tests against the real Azure services,

Testing

Here're two successful runs of Build workflow in my fork:

TODOs

I have already configured a federated identity credential on a user-assigned managed identity (see https://aka.ms/config-federated-identity-on-uami). In order to run tests against the real Azure services, the following actions are required:

Since I don't have permission to create GitHub environment/secrets in https://github.com/quarkiverse/quarkus-azure-services, I need help on these TODOs, talk to @majguo for these secrets' values. @gastaldi @ppalaga @gsmet.

NOTE: TODOs are completed with help from @gastaldi. They're configured as Environment Variables (instead of Environment Secrets).

Signed-off-by: Jianguo Ma jiangma@microsoft.com

gastaldi commented 1 year ago

@majguo we recommend adding the secrets using the Terraform file in https://github.com/quarkiverse/quarkiverse-devops/blob/main/quarkus-azure-services.tf:

Here is an example: https://registry.terraform.io/providers/integrations/github/latest/docs/resources/actions_environment_secret

Let me know if that works for you

majguo commented 1 year ago

@majguo we recommend adding the secrets using the Terraform file in https://github.com/quarkiverse/quarkiverse-devops/blob/main/quarkus-azure-services.tf:

Here is an example: https://registry.terraform.io/providers/integrations/github/latest/docs/resources/actions_environment_secret

Let me know if that works for you

Thanks for @gastaldi's help, we have set up Environment Variables (instead of Environment Secrets) in https://github.com/quarkiverse/quarkus-azure-services (see https://github.com/quarkiverse/quarkiverse-devops/pull/147 and https://github.com/quarkiverse/quarkiverse-devops/pull/149). However, it looks like the configured Environment Variables can't be accessed in Build workflow (see this) as it's triggered by the PR issuer (in this case, it's me) who doesn't have permission to access Environment Variables in quarkiverse/quarkus-azure-services. That's why I pushed commit set up integ test against real azure services in workflow 'Quarkus ecosystem CI' as workflow 'Quarkus ecosystem CI' is triggered by quarkusbot which has necessary permission.

majguo commented 1 year ago

Build successfully ran which executed the integration tests against the real Azure services: Merge pull request #108 from majguo/majguo/integ-test · quarkiverse/quarkus-azure-services@0aeeb83 (github.com).

ppalaga commented 1 year ago

Nice work, well documented, thanks a lot @majguo!