Skip to content

Commit

Permalink
lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Haroon-Dweikat-Ntx committed Dec 25, 2024
1 parent 9837a7c commit 8aefc76
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 11 deletions.
2 changes: 1 addition & 1 deletion nutanix/services/prismv2/data_source_restore_points_v2.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func DatasourceNutanixFetchRestorePointsV2() *schema.Resource {
"limit": {
Type: schema.TypeInt,
Optional: true,
Default: 50,
Default: 50, //nolint:gomnd
ValidateFunc: validation.IntBetween(1, 100),
},
"filter": {
Expand Down
40 changes: 30 additions & 10 deletions nutanix/services/prismv2/resource_nutanix_deploy_pc_v2_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,53 +46,73 @@ func TestAccV2NutanixDeployPcResource_Basic(t *testing.T) {
// List pcs
{
Config: testAccDeployPCConfig(name) + testAccListPCConfig(),
Check: resource.ComposeTestCheckFunc(),
Check: resource.ComposeTestCheckFunc(
resource.TestCheckResourceAttrSet(datasourceNameListPCs, "pcs.#"),
),
},
// Fetch pc
{
Config: testAccDeployPCConfig(name) + testAccFetchPCConfig(),
Check: resource.ComposeTestCheckFunc(),
Check: resource.ComposeTestCheckFunc(
resource.TestCheckResourceAttrSet(datasourceNameFetchPC, "ext_id"),
),
},
// Create backup target
{
Config: backupTargetConfig,
Check: resource.ComposeTestCheckFunc(),
Check: resource.ComposeTestCheckFunc(
resource.TestCheckResourceAttrSet(resourceNameBackupTarget, "ext_id"),
),
},
// List backup targets
{
Config: backupTargetConfig + testAccListBackupTargetsDatasourceConfig(),
Check: resource.ComposeTestCheckFunc(),
Check: resource.ComposeTestCheckFunc(
resource.TestCheckResourceAttrSet(datasourceNameListBackupTargets, "backup_targets.#"),
),
},
// Fetch backup target
{
Config: backupTargetConfig + testAccFetchBackupTargetDatasourceConfig(),
Check: resource.ComposeTestCheckFunc(),
Check: resource.ComposeTestCheckFunc(
resource.TestCheckResourceAttrSet(datasourceNameFetchBackupTarget, "ext_id"),
),
},
// Create restore source
{
Config: restoreSourceConfig,
Check: resource.ComposeTestCheckFunc(),
Check: resource.ComposeTestCheckFunc(
resource.TestCheckResourceAttrSet(resourceNameRestoreSource, "ext_id"),
),
},
// Fetch restore source
{
Config: restoreSourceConfig + testAccFetchRestoreSourceDatasourceConfig(),
Check: resource.ComposeTestCheckFunc(),
Check: resource.ComposeTestCheckFunc(
resource.TestCheckResourceAttrSet(datasourceNameFetchRestoreSource, "ext_id"),
),
},
// restore pc
{
Config: restorePCConfig,
Check: resource.ComposeTestCheckFunc(),
Check: resource.ComposeTestCheckFunc(
resource.TestCheckResourceAttrSet(resourceNameRestorePC, "ext_id"),
),
},

// update backup target
{
Config: backupTargetUpdateConfig,
Check: resource.ComposeTestCheckFunc(),
Check: resource.ComposeTestCheckFunc(
resource.TestCheckResourceAttrSet(resourceNameBackupTarget, "ext_id"),
),
},
// unregister pc
{
Config: testAccDeployPCConfig(name) + testAccUnregisterPCResourceConfig(),
Check: resource.ComposeTestCheckFunc(),
Check: resource.ComposeTestCheckFunc(
resource.TestCheckResourceAttrSet(resourceNameUnregisterPC, "ext_id"),
),
},
},
})
Expand Down

0 comments on commit 8aefc76

Please sign in to comment.