Skip to content

Commit

Permalink
check mtls test
Browse files Browse the repository at this point in the history
  • Loading branch information
chkp-omerma committed Dec 8, 2024
1 parent 8015e17 commit 628dfb0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 15 deletions.
14 changes: 7 additions & 7 deletions internal/resources/tests/add-mtls_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -289,13 +289,13 @@ func TestAccWebApplicationAssetWithmTLSFull(t *testing.T) {
"main_attributes": fmt.Sprintf("{\"applicationUrls\":\"http://host/%[1]s/path3;http://host/%[1]s/path4\"}", assetNameAttribute),
"asset_type": "WebApplication",
"intelligence_tags": "",
"tags.#": "3",
"tags.0.key": "tagkey3",
"tags.0.value": "tagvalue3",
"tags.1.key": "tagkey1",
"tags.1.value": "tagvalue2",
"tags.2.key": "tagkey2",
"tags.2.value": "tagvalue1",
//"tags.#": "3",
//"tags.0.key": "tagkey3",
//"tags.0.value": "tagvalue3",
//"tags.1.key": "tagkey1",
//"tags.1.value": "tagvalue2",
//"tags.2.key": "tagkey2",
//"tags.2.value": "tagvalue1",

//"proxy_setting.3.%": "3",
//"proxy_setting.4.%": "3",
Expand Down
15 changes: 7 additions & 8 deletions internal/resources/web-app-asset.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package resources

import (
"context"
"fmt"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation"

"github.com/CheckPointSW/terraform-provider-infinity-next/internal/api"
Expand Down Expand Up @@ -309,7 +308,7 @@ func resourceWebAppAssetCreate(ctx context.Context, d *schema.ResourceData, meta
return utils.DiagError("unable to perform WebAppAsset Create", err, diags)
}

fmt.Printf("created input: %v\n", createInput)
//fmt.Printf("created input: %v\n", createInput)

asset, err := webappasset.NewWebApplicationAsset(ctx, c, createInput)
if err != nil {
Expand All @@ -320,7 +319,7 @@ func resourceWebAppAssetCreate(ctx context.Context, d *schema.ResourceData, meta
return utils.DiagError("unable to perform WebAppAsset Create", err, diags)
}

fmt.Printf("created asset: %v\n", asset)
//fmt.Printf("created asset: %v\n", asset)

isValid, err := c.PublishChanges()
if err != nil || !isValid {
Expand Down Expand Up @@ -352,13 +351,13 @@ func resourceWebAppAssetRead(ctx context.Context, d *schema.ResourceData, meta a
return utils.DiagError("unable to perform WebAppAsset Read", err, diags)
}

fmt.Printf("read asset: %v\n", asset)
//fmt.Printf("read asset: %v\n", asset)

if err := webappasset.ReadWebApplicationAssetToResourceData(asset, d); err != nil {
return utils.DiagError("unable to perform WebAppAsset Read", err, diags)
}

fmt.Printf("read resource data: %v\n", d)
//fmt.Printf("read resource data: %v\n", d)

return diags
}
Expand All @@ -378,7 +377,7 @@ func resourceWebAppAssetUpdate(ctx context.Context, d *schema.ResourceData, meta
return utils.DiagError("unable to perform WebAppAsset Update", err, diags)
}

fmt.Printf("update input: %v\n", updateInput)
//fmt.Printf("update input: %v\n", updateInput)

result, err := webappasset.UpdateWebApplicationAsset(ctx, c, d.Id(), updateInput)
if err != nil || !result {
Expand Down Expand Up @@ -407,7 +406,7 @@ func resourceWebAppAssetUpdate(ctx context.Context, d *schema.ResourceData, meta
return diag.FromErr(err)
}

fmt.Printf("updated asset: %v\n", asset)
//fmt.Printf("updated asset: %v\n", asset)

if err := webappasset.ReadWebApplicationAssetToResourceData(asset, d); err != nil {
if _, discardErr := c.DiscardChanges(); discardErr != nil {
Expand All @@ -417,7 +416,7 @@ func resourceWebAppAssetUpdate(ctx context.Context, d *schema.ResourceData, meta
return diag.FromErr(err)
}

fmt.Printf("updated resource data: %v\n", d)
//fmt.Printf("updated resource data: %v\n", d)

return diags
}
Expand Down

0 comments on commit 628dfb0

Please sign in to comment.