diff --git a/sonarqube/resource_sonarqube_azure_binding.go b/sonarqube/resource_sonarqube_azure_binding.go index c29a723e..1a56e8f3 100644 --- a/sonarqube/resource_sonarqube_azure_binding.go +++ b/sonarqube/resource_sonarqube_azure_binding.go @@ -67,18 +67,7 @@ func resourceSonarqubeAzureBinding() *schema.Resource { } } -func checkAzureBindingSupport(conf *ProviderConfiguration) error { - if strings.ToLower(conf.sonarQubeEdition) == "community" { - return fmt.Errorf("Azure Devops Bindings are not supported in the Community edition of SonarQube. You are using: SonarQube %s version %s", conf.sonarQubeEdition, conf.sonarQubeVersion) - } - return nil -} - func resourceSonarqubeAzureBindingCreate(d *schema.ResourceData, m interface{}) error { - if err := checkAzureBindingSupport(m.(*ProviderConfiguration)); err != nil { - return err - } - sonarQubeURL := m.(*ProviderConfiguration).sonarQubeURL sonarQubeURL.Path = strings.TrimSuffix(sonarQubeURL.Path, "/") + "/api/alm_settings/set_azure_binding" @@ -114,10 +103,6 @@ func resourceSonarqubeAzureBindingCreate(d *schema.ResourceData, m interface{}) } func resourceSonarqubeAzureBindingRead(d *schema.ResourceData, m interface{}) error { - if err := checkAzureBindingSupport(m.(*ProviderConfiguration)); err != nil { - return err - } - // id consists of "project/project_name/repository" idSlice := strings.SplitN(d.Id(), "/", 3) sonarQubeURL := m.(*ProviderConfiguration).sonarQubeURL @@ -160,10 +145,6 @@ func resourceSonarqubeAzureBindingRead(d *schema.ResourceData, m interface{}) er } func resourceSonarqubeAzureBindingDelete(d *schema.ResourceData, m interface{}) error { - if err := checkAzureBindingSupport(m.(*ProviderConfiguration)); err != nil { - return err - } - sonarQubeURL := m.(*ProviderConfiguration).sonarQubeURL sonarQubeURL.Path = strings.TrimSuffix(sonarQubeURL.Path, "/") + "/api/alm_settings/delete_binding" sonarQubeURL.RawQuery = url.Values{ diff --git a/sonarqube/resource_sonarqube_azure_binding_test.go b/sonarqube/resource_sonarqube_azure_binding_test.go index 00156af5..382d2b32 100644 --- a/sonarqube/resource_sonarqube_azure_binding_test.go +++ b/sonarqube/resource_sonarqube_azure_binding_test.go @@ -18,11 +18,6 @@ func init() { func testSweepSonarqubeAzureBinding(r string) error { return nil } -func testAccPreCheckAzureBindingSupport(t *testing.T) { - if err := checkAzureBindingSupport(testAccProvider.Meta().(*ProviderConfiguration)); err != nil { - t.Skipf("Skipping test of unsupported feature (Azure Binding)") - } -} func testAccSonarqubeAzureBindingName(rnd string, projKey string, almSetting string, projName string, repoName string) string { return fmt.Sprintf(` @@ -52,7 +47,7 @@ func TestAccSonarqubeAzureBindingName(t *testing.T) { name := "sonarqube_azure_binding." + rnd resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t); testAccPreCheckAzureBindingSupport(t) }, + PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ {