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

Fix Acceptance Test For TestAccGithubUserSshKey_basic And TestAccGithubRepositoryDeployKey_basic #431

Closed
jcudit opened this issue Apr 17, 2020 · 0 comments
Labels
Good first issue Good for newcomers Status: Up for grabs Issues that are ready to be worked on by anyone Type: Bug Something isn't working as documented

Comments

@jcudit
Copy link
Contributor

jcudit commented Apr 17, 2020

Acceptance test runs have been failing for TestAccGithubUserSshKey_basic and TestAccGithubRepositoryDeployKey_basic .

I vaguely remember one failing before the other started and now are currently failing for the master branch.

=== CONT  TestAccGithubRepositoryDeployKey_basic
--- FAIL: TestAccGithubRepositoryDeployKey_basic (7.18s)
    testing.go:654: Step 0 error: errors during apply:

        Error: POST https://api.github.com/repos/terraformtesting/acctest-4xducydblu/keys: 422 Validation Failed [{Resource:PublicKey Field:key Code:custom Message:key is already in use}]

          on /var/folders/t1/p9cyhv6s2wg4g8s_x6zkpz_m0000gn/T/tf-test131430109/main.tf line 6:
          (source code not available)


FAIL
FAIL	github.com/terraform-providers/terraform-provider-github/github	7.461s
=== CONT  TestAccGithubUserSshKey_basic
--- FAIL: TestAccGithubUserSshKey_basic (0.73s)
    testing.go:654: Step 0 error: errors during apply:

        Error: POST https://api.github.com/user/keys: 422 Validation Failed [{Resource:PublicKey Field:key Code:custom Message:key is already in use}]

          on /var/folders/t1/p9cyhv6s2wg4g8s_x6zkpz_m0000gn/T/tf-test744524835/main.tf line 2:
          (source code not available)


FAIL
FAIL	github.com/terraform-providers/terraform-provider-github/github	1.023s

I suspect a test suite run was halted, leaving around acceptance test fixtures that are reused on subsequent runs. A solution may involve using unique values instead of having to clean up successfully 100% of the time.

/cc https://github.com/terraform-providers/terraform-provider-github/pull/411

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Good first issue Good for newcomers Status: Up for grabs Issues that are ready to be worked on by anyone Type: Bug Something isn't working as documented
Projects
None yet
Development

No branches or pull requests

1 participant