microsoft / terraform-provider-azuredevops

Terraform Azure DevOps provider
https://www.terraform.io/docs/providers/azuredevops/
MIT License
387 stars 279 forks source link

[Bug fix] - `azuredevops_git_repository` - Fix plan fails when repo deleted outside of Terraform #1087

Closed xuzhang3 closed 5 months ago

xuzhang3 commented 5 months ago

All Submissions:

What about the current behavior has changed?

Issue Number: #1086

=== RUN   TestAccGitRepo_CreateAndUpdate
=== PAUSE TestAccGitRepo_CreateAndUpdate
=== RUN   TestAccGitRepo_Create_IncorrectInitialization
=== PAUSE TestAccGitRepo_Create_IncorrectInitialization
=== RUN   TestAccGitRepo_Create_Import
=== PAUSE TestAccGitRepo_Create_Import
=== RUN   TestAccGitRepo_RepoInitialization_Clean
=== PAUSE TestAccGitRepo_RepoInitialization_Clean
=== RUN   TestAccGitRepo_RepoInitialization_Uninitialized
=== PAUSE TestAccGitRepo_RepoInitialization_Uninitialized
=== RUN   TestAccGitRepo_RepoFork_BranchNotEmpty
=== PAUSE TestAccGitRepo_RepoFork_BranchNotEmpty
=== RUN   TestAccGitRepo_PrivateImport_BranchNotEmpty
=== PAUSE TestAccGitRepo_PrivateImport_BranchNotEmpty
=== CONT  TestAccGitRepo_CreateAndUpdate
=== CONT  TestAccGitRepo_RepoInitialization_Uninitialized
=== CONT  TestAccGitRepo_Create_Import
=== CONT  TestAccGitRepo_Create_IncorrectInitialization
=== CONT  TestAccGitRepo_RepoInitialization_Clean
=== CONT  TestAccGitRepo_PrivateImport_BranchNotEmpty
=== CONT  TestAccGitRepo_RepoFork_BranchNotEmpty
--- PASS: TestAccGitRepo_Create_IncorrectInitialization (5.06s)
=== NAME  TestAccGitRepo_PrivateImport_BranchNotEmpty
    resource_git_repository_test.go:210: Step 1/1 error: Error running apply: exit status 1

        Error: Error import repository in Azure DevOps: Request returned status: 400 Bad Request

          with azuredevops_git_repository.import,
          on terraform_plugin_test.tf line 26, in resource "azuredevops_git_repository" "import":
          26:   resource "azuredevops_git_repository" "import" {

--- PASS: TestAccGitRepo_RepoInitialization_Uninitialized (61.00s)
--- PASS: TestAccGitRepo_RepoInitialization_Clean (62.29s)
--- PASS: TestAccGitRepo_RepoFork_BranchNotEmpty (65.21s)
--- FAIL: TestAccGitRepo_PrivateImport_BranchNotEmpty (75.26s)
--- PASS: TestAccGitRepo_Create_Import (87.40s)
--- PASS: TestAccGitRepo_CreateAndUpdate (102.15s)
FAIL
FAIL    github.com/microsoft/terraform-provider-azuredevops/azuredevops/internal/acceptancetests        102.786s
FAIL

Does this introduce a change to go.mod, go.sum or vendor/?

Does this introduce a breaking change?

Any relevant logs, error output, etc?

(If it’s long, please paste to https://ghostbin.com/ and insert the link here.)

Other information