Skip to content

Commit

Permalink
Merge pull request #887 from Juniper/884-add-constraint-for-iba_widge…
Browse files Browse the repository at this point in the history
…t-and-fixup-some-tests

more build_errors_count issues and fix unsafe Node Patch
  • Loading branch information
bwJuniper authored Oct 1, 2024
2 parents 34fc0b7 + 8f4f6cd commit 35692c6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion apstra/blueprint/blueprint.go
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,7 @@ func (o *Blueprint) SetName(ctx context.Context, bpClient *apstra.TwoStageL3Clos
nodeId = v.Id
}

err = bpClient.PatchNode(ctx, nodeId, &node{Label: o.Name.ValueString()}, nil)
err = bpClient.PatchNodeUnsafe(ctx, nodeId, &node{Label: o.Name.ValueString()}, nil)
if err != nil {
diags.AddError(
fmt.Sprintf(errApiPatchWithTypeAndId, bpClient.Id(), nodeId),
Expand Down
14 changes: 7 additions & 7 deletions apstra/resource_datacenter_blueprint_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ func TestResourceDatacenterBlueprint(t *testing.T) {
resource.TestCheckResourceAttr("apstra_datacenter_blueprint.test", "external_router_count", "0"),
resource.TestCheckResourceAttr("apstra_datacenter_blueprint.test", "has_uncommitted_changes", "true"),
resource.TestCheckResourceAttrWith("apstra_datacenter_blueprint.test", "version", testCheckIntGE1),
resource.TestCheckResourceAttr("apstra_datacenter_blueprint.test", "build_errors_count", "58"),
resource.TestCheckResourceAttrWith("apstra_datacenter_blueprint.test", "build_errors_count", atleast50),
resource.TestCheckResourceAttr("apstra_datacenter_blueprint.test", "build_warnings_count", "0"),

resource.TestCheckResourceAttr("apstra_datacenter_blueprint.test", "anti_affinity_mode", apstra.AntiAffinityModeEnabledStrict.String()),
Expand Down Expand Up @@ -296,7 +296,7 @@ func TestResourceDatacenterBlueprint(t *testing.T) {
resource.TestCheckResourceAttr("apstra_datacenter_blueprint.test", "external_router_count", "0"),
resource.TestCheckResourceAttr("apstra_datacenter_blueprint.test", "has_uncommitted_changes", "true"),
resource.TestCheckResourceAttrWith("apstra_datacenter_blueprint.test", "version", testCheckIntGE1),
resource.TestCheckResourceAttr("apstra_datacenter_blueprint.test", "build_errors_count", "58"),
resource.TestCheckResourceAttrWith("apstra_datacenter_blueprint.test", "build_errors_count", atleast50),
resource.TestCheckResourceAttr("apstra_datacenter_blueprint.test", "build_warnings_count", "0"),

resource.TestCheckResourceAttr("apstra_datacenter_blueprint.test", "anti_affinity_mode", apstra.AntiAffinityModeEnabledStrict.String()),
Expand Down Expand Up @@ -479,7 +479,7 @@ func TestResourceDatacenterBlueprint(t *testing.T) {
resource.TestCheckResourceAttr("apstra_datacenter_blueprint.test", "external_router_count", "0"),
resource.TestCheckResourceAttr("apstra_datacenter_blueprint.test", "has_uncommitted_changes", "true"),
resource.TestCheckResourceAttrWith("apstra_datacenter_blueprint.test", "version", testCheckIntGE1),
resource.TestCheckResourceAttr("apstra_datacenter_blueprint.test", "build_errors_count", "58"),
resource.TestCheckResourceAttrWith("apstra_datacenter_blueprint.test", "build_errors_count", atleast50),
resource.TestCheckResourceAttr("apstra_datacenter_blueprint.test", "build_warnings_count", "0"),

resource.TestCheckResourceAttr("apstra_datacenter_blueprint.test", "anti_affinity_mode", apstra.AntiAffinityModeEnabledStrict.String()),
Expand Down Expand Up @@ -597,7 +597,7 @@ func TestResourceDatacenterBlueprint(t *testing.T) {
resource.TestCheckResourceAttr("apstra_datacenter_blueprint.test", "external_router_count", "0"),
resource.TestCheckResourceAttr("apstra_datacenter_blueprint.test", "has_uncommitted_changes", "true"),
resource.TestCheckResourceAttrWith("apstra_datacenter_blueprint.test", "version", testCheckIntGE1),
resource.TestCheckResourceAttr("apstra_datacenter_blueprint.test", "build_errors_count", "58"),
resource.TestCheckResourceAttrWith("apstra_datacenter_blueprint.test", "build_errors_count", atleast50),
resource.TestCheckResourceAttr("apstra_datacenter_blueprint.test", "build_warnings_count", "0"),

resource.TestCheckResourceAttr("apstra_datacenter_blueprint.test", "anti_affinity_mode", apstra.AntiAffinityModeEnabledStrict.String()),
Expand Down Expand Up @@ -641,7 +641,7 @@ func TestResourceDatacenterBlueprint(t *testing.T) {
resource.TestCheckResourceAttr("apstra_datacenter_blueprint.test", "external_router_count", "0"),
resource.TestCheckResourceAttr("apstra_datacenter_blueprint.test", "has_uncommitted_changes", "true"),
resource.TestCheckResourceAttrWith("apstra_datacenter_blueprint.test", "version", testCheckIntGE1),
resource.TestCheckResourceAttr("apstra_datacenter_blueprint.test", "build_errors_count", "58"),
resource.TestCheckResourceAttrWith("apstra_datacenter_blueprint.test", "build_errors_count", atleast50),
resource.TestCheckResourceAttr("apstra_datacenter_blueprint.test", "build_warnings_count", "0"),

resource.TestCheckResourceAttr("apstra_datacenter_blueprint.test", "anti_affinity_mode", apstra.AntiAffinityModeEnabledStrict.String()),
Expand Down Expand Up @@ -759,7 +759,7 @@ func TestResourceDatacenterBlueprint(t *testing.T) {
resource.TestCheckResourceAttr("apstra_datacenter_blueprint.test", "external_router_count", "0"),
resource.TestCheckResourceAttr("apstra_datacenter_blueprint.test", "has_uncommitted_changes", "true"),
resource.TestCheckResourceAttrWith("apstra_datacenter_blueprint.test", "version", testCheckIntGE1),
resource.TestCheckResourceAttr("apstra_datacenter_blueprint.test", "build_errors_count", "58"),
resource.TestCheckResourceAttrWith("apstra_datacenter_blueprint.test", "build_errors_count", atleast50),
resource.TestCheckResourceAttr("apstra_datacenter_blueprint.test", "build_warnings_count", "0"),

resource.TestCheckResourceAttr("apstra_datacenter_blueprint.test", "anti_affinity_mode", apstra.AntiAffinityModeEnabledStrict.String()),
Expand Down Expand Up @@ -825,7 +825,7 @@ func TestResourceDatacenterBlueprint(t *testing.T) {
resource.TestCheckResourceAttr("apstra_datacenter_blueprint.test", "external_router_count", "0"),
resource.TestCheckResourceAttr("apstra_datacenter_blueprint.test", "has_uncommitted_changes", "true"),
resource.TestCheckResourceAttrWith("apstra_datacenter_blueprint.test", "version", testCheckIntGE1),
resource.TestCheckResourceAttr("apstra_datacenter_blueprint.test", "build_errors_count", "58"),
resource.TestCheckResourceAttrWith("apstra_datacenter_blueprint.test", "build_errors_count", atleast50),
resource.TestCheckResourceAttr("apstra_datacenter_blueprint.test", "build_warnings_count", "0"),

resource.TestCheckResourceAttr("apstra_datacenter_blueprint.test", "anti_affinity_mode", apstra.AntiAffinityModeEnabledStrict.String()),
Expand Down

0 comments on commit 35692c6

Please sign in to comment.