From 016a5d6c7a5b1537876228450516629cff46c949 Mon Sep 17 00:00:00 2001
From: ramaniprateek
Date: Fri, 13 Dec 2024 11:47:20 +0530
Subject: [PATCH] Pipeline Issues Fixed
---
bigip/resource_bigip_ltm_datagroup.go | 2 +-
bigip/resource_bigip_ltm_profile_http_test.go | 13 ++++++-------
2 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/bigip/resource_bigip_ltm_datagroup.go b/bigip/resource_bigip_ltm_datagroup.go
index 8112d80b..c1a40099 100644
--- a/bigip/resource_bigip_ltm_datagroup.go
+++ b/bigip/resource_bigip_ltm_datagroup.go
@@ -128,7 +128,7 @@ func resourceBigipLtmDataGroupRead(ctx context.Context, d *schema.ResourceData,
name := d.Id()
log.Printf("[DEBUG] Retrieving Data Group List %s", name)
datagroup, err := client.GetInternalDataGroup(name)
- if err != nil && !strings.Contains(err.Error(), "not found") {
+ if err != nil && !strings.Contains(err.Error(), "not found") {
return diag.FromErr(fmt.Errorf("Error retrieving Data Group List %s: %v ", name, err))
}
diff --git a/bigip/resource_bigip_ltm_profile_http_test.go b/bigip/resource_bigip_ltm_profile_http_test.go
index a4e8fa80..950a3594 100644
--- a/bigip/resource_bigip_ltm_profile_http_test.go
+++ b/bigip/resource_bigip_ltm_profile_http_test.go
@@ -92,7 +92,7 @@ func TestAccBigipLtmProfileHttpUpdateServerAgent(t *testing.T) {
CheckDestroy: testCheckHttpsDestroyed,
Steps: []resource.TestStep{
{
- Config: testaccbigipltmprofilehttpDefaultConfig(TestPartition, TestHttpName, "http-profile-test"),
+ Config: testaccbigipltmprofilehttpDefaultConfig(TestPartition, TestHttpName),
Check: resource.ComposeTestCheckFunc(
testCheckhttpExists(TestHttpName),
resource.TestCheckResourceAttr(resFullName, "name", TestHttpName),
@@ -109,7 +109,7 @@ func TestAccBigipLtmProfileHttpUpdateServerAgent(t *testing.T) {
),
},
{
- Config: testaccbigipltmprofilehttpDefaultConfig(TestPartition, TestHttpName, "http-profile-test"),
+ Config: testaccbigipltmprofilehttpDefaultConfig(TestPartition, TestHttpName),
Check: resource.ComposeTestCheckFunc(
testCheckhttpExists(TestHttpName),
resource.TestCheckResourceAttr(resFullName, "name", TestHttpName),
@@ -134,7 +134,7 @@ func TestAccBigipLtmProfileHttpUpdateFallbackHost(t *testing.T) {
// CheckDestroy: testCheckHttpsDestroyed,
Steps: []resource.TestStep{
{
- Config: testaccbigipltmprofilehttpDefaultConfig(TestPartition, TestHttpName, "http-profile-test"),
+ Config: testaccbigipltmprofilehttpDefaultConfig(TestPartition, TestHttpName),
Check: resource.ComposeTestCheckFunc(
testCheckhttpExists(TestHttpName),
resource.TestCheckResourceAttr(resFullName, "name", TestHttpName),
@@ -151,7 +151,7 @@ func TestAccBigipLtmProfileHttpUpdateFallbackHost(t *testing.T) {
),
},
{
- Config: testaccbigipltmprofilehttpDefaultConfig(TestPartition, TestHttpName, "http-profile-test"),
+ Config: testaccbigipltmprofilehttpDefaultConfig(TestPartition, TestHttpName),
Check: resource.ComposeTestCheckFunc(
testCheckhttpExists(TestHttpName),
resource.TestCheckResourceAttr(resFullName, "name", TestHttpName),
@@ -162,7 +162,6 @@ func TestAccBigipLtmProfileHttpUpdateFallbackHost(t *testing.T) {
})
}
-
func TestAccBigipLtmProfileHttpUpdateBasicAuthRealm(t *testing.T) {
t.Parallel()
var instName = "test-http-Update-BasicAuthRealm"
@@ -535,13 +534,13 @@ func testCheckHttpsDestroyed(s *terraform.State) error {
return nil
}
-func testaccbigipltmprofilehttpDefaultConfig(partition, profileName, resourceName string) string {
+func testaccbigipltmprofilehttpDefaultConfig(partition, profileName string) string {
return fmt.Sprintf(`
resource "bigip_ltm_profile_http" "%[3]s" {
name = "%[2]s"
defaults_from = "/%[1]s/http"
}
-`, partition, profileName, resourceName)
+`, partition, profileName, "http-profile-test")
}
func testaccbigipltmprofilehttpUpdateServeragentConfig(partition, profileName, resourceName string) string {