-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1005 from F5Networks/devel_01082024
deal sync to master
- Loading branch information
Showing
9 changed files
with
202 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
/* | ||
Original work from https://github.com/DealerDotCom/terraform-provider-bigip | ||
Modifications Copyright 2019 F5 Networks Inc. | ||
This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. | ||
If a copy of the MPL was not distributed with this file,You can obtain one at https://mozilla.org/MPL/2.0/. | ||
*/ | ||
package bigip | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" | ||
) | ||
|
||
func TestAccBigipLtmWafPolicyTestCases(t *testing.T) { | ||
resource.Test(t, resource.TestCase{ | ||
PreCheck: func() { | ||
testAcctPreCheck(t) | ||
}, | ||
Providers: testAccProviders, | ||
CheckDestroy: testMonitorsDestroyed, | ||
Steps: []resource.TestStep{ | ||
{ | ||
Config: loadFixtureString("../examples/awaf/awaftest_issue822.tf"), | ||
Check: resource.ComposeTestCheckFunc( | ||
// testCheckMonitorExists("/Common/test_monitor_tc1"), | ||
// testCheckMonitorExists("/Common/test_monitor_tc2"), | ||
// testCheckMonitorExists("/Common/test_monitor_tc3"), | ||
// testCheckMonitorExists("/Common/test_monitor_tc4"), | ||
// testCheckMonitorExists("/Common/test_monitor_tc5"), | ||
), | ||
}, | ||
}, | ||
}) | ||
} | ||
|
||
// func testCheckMonitorExists(name string) resource.TestCheckFunc { | ||
// return func(s *terraform.State) error { | ||
// client := testAccProvider.Meta().(*bigip.BigIP) | ||
|
||
// monitors, err := client.Monitors() | ||
// if err != nil { | ||
// return err | ||
// } | ||
|
||
// for _, m := range monitors { | ||
// if m.FullPath == name { | ||
// return nil | ||
// } | ||
// } | ||
// return fmt.Errorf("Monitor %s was not created ", name) | ||
// } | ||
// } | ||
|
||
// func testMonitorsDestroyed(s *terraform.State) error { | ||
// client := testAccProvider.Meta().(*bigip.BigIP) | ||
|
||
// monitors, err := client.Monitors() | ||
// if err != nil { | ||
// return err | ||
// } | ||
|
||
// for _, rs := range s.RootModule().Resources { | ||
// if rs.Type != "bigip_ltm_monitor" { | ||
// continue | ||
// } | ||
|
||
// name := rs.Primary.ID | ||
// for _, m := range monitors { | ||
// if m.FullPath == name { | ||
// return fmt.Errorf("Monitor %s not destroyed ", name) | ||
// } | ||
// } | ||
// } | ||
// return nil | ||
// } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package bigip | ||
|
||
// ProviderVersion is set at build-time in the release process | ||
var ProviderVersion = "1.22.2" | ||
var ProviderVersion = "1.22.3" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters