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

Test Azure CLI and templates #208

Merged
merged 10 commits into from
Jul 26, 2024
Merged

Test Azure CLI and templates #208

merged 10 commits into from
Jul 26, 2024

Conversation

julienp
Copy link
Contributor

@julienp julienp commented Jul 24, 2024

Test that the az CLI is working and can login.

Test that the azure-${sdk} templates work.

This requires the following secrets in GHA:

  • ARM_CLIENT_ID
  • ARM_CLIENT_SECRET
  • ARM_TENANT_ID
  • ARM_SUBSCRIPTION_ID

Ref #209

Test that the `az` CLI is working and can login.

Test that the `azure-${sdk}` templates work.

This requires the following secrets in GHA:
 * ARM_CLIENT_ID
 * ARM_CLIENT_SECRET
 * ARM_TENANT_ID
 * ARM_SUBSCRIPTION_ID
@julienp julienp marked this pull request as ready for review July 25, 2024 14:28
@julienp julienp requested a review from a team July 25, 2024 14:29
for _, sdk := range sdksToTest {
// python, typescript, ...
testCases = append(testCases, testCase{sdk, map[string]string{}})
if sdk == "java" {
Copy link
Contributor Author

@julienp julienp Jul 25, 2024

Choose a reason for hiding this comment

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

I don't want to change the containers in any way in this PR, so skipping some things that currently fail here, and below for azure-typescript.

@julienp julienp changed the title Test Azure Test Azure CLI and templates Jul 25, 2024
t.Helper()
v := os.Getenv(env)
if v == "" {
t.Fatalf("Required environment variable %q not set", env)
Copy link
Contributor

Choose a reason for hiding this comment

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

Should these be skipped, so tests can be run locally? Or I guess that maybe doesn't make a lot of sense for the docker containers? It's a pattern we used for other cloud tests.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was wondering about that, and I worried about a test not running because of a broken CI setup. I'd rather it fail loudly.

I was thinking that for running tests locally I could add something that runs esc run pulumi/providers.all -- test_command_here. That gives you easy access to all the env vars.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, this definitely makes sense during development.

The esc run is also great, though I think it only works for pulumi employees (unless I'm misunderstanding esc).

Kindof an aside, but I'd love to get to the point where we skip no tests in CI, so we can assert that there are no skipped tests during the CI run, but sprinkle t.Skip() more liberally through tests that don't necessarily work locally.

Either way, I'm happy to get what you have here now merged.

@julienp julienp merged commit 6c84d21 into main Jul 26, 2024
21 checks passed
@julienp julienp deleted the julienp/test-az branch July 26, 2024 12:50
julienp added a commit that referenced this pull request Jul 26, 2024
Pass through env variables for tests in the release workflow.

This adds the changes from
#208 and
#213 to the
release workflow.
Source-Controller pushed a commit to Source-Controller/Pulumi-Docker that referenced this pull request Oct 17, 2024
Pass through env variables for tests in the release workflow.

This adds the changes from
pulumi/pulumi-docker-containers#208 and
pulumi/pulumi-docker-containers#213 to the
release workflow.
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.

2 participants