Skip to content

Commit

Permalink
Clean Up
Browse files Browse the repository at this point in the history
  • Loading branch information
Sharon Nam authored and Sharon Nam committed Jan 26, 2024
1 parent 7e988e4 commit d0a2d34
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 23 deletions.
9 changes: 0 additions & 9 deletions internal/service/lexv2models/slot.go
Original file line number Diff line number Diff line change
Expand Up @@ -515,9 +515,6 @@ func (r *resourceSlot) Schema(ctx context.Context, req resource.SchemaRequest, r
},
"name": schema.StringAttribute{
Required: true,
// PlanModifiers: []planmodifier.String{
// stringplanmodifier.RequiresReplace(),
// },
},
"slot_type_id": schema.StringAttribute{
Optional: true,
Expand Down Expand Up @@ -640,8 +637,6 @@ func (r *resourceSlot) Update(ctx context.Context, req resource.UpdateRequest, r
if slotHasChanges(ctx, plan, state) {
input := &lexmodelsv2.UpdateSlotInput{}

// TODO: expand here, or check for updatable arguments individually?

resp.Diagnostics.Append(flex.Expand(context.WithValue(ctx, flex.ResourcePrefix, ResNameSlot), plan, input)...)
if resp.Diagnostics.HasError() {
return
Expand Down Expand Up @@ -708,10 +703,6 @@ func (r *resourceSlot) Delete(ctx context.Context, req resource.DeleteRequest, r
}
}

// func (r *resourceSlot) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse) {
// resource.ImportStatePassthroughID(ctx, path.Root("id"), req, resp)
// }

func findSlotByID(ctx context.Context, conn *lexmodelsv2.Client, id string) (*lexmodelsv2.DescribeSlotOutput, error) {
parts, err := intflex.ExpandResourceId(id, slotIDPartCount, false)
if err != nil {
Expand Down
15 changes: 1 addition & 14 deletions internal/service/lexv2models/slot_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ func TestAccLexV2ModelsSlot_updateMultipleValuesSetting(t *testing.T) {
})
}

func TestAccLexV2ModelsSlot_updateObfuscationSetting(t *testing.T) {
func TestAccLexV2ModelsSlot_ObfuscationSetting(t *testing.T) {
ctx := acctest.Context(t)

var slot lexmodelsv2.DescribeSlotOutput
Expand Down Expand Up @@ -139,19 +139,6 @@ func TestAccLexV2ModelsSlot_updateObfuscationSetting(t *testing.T) {
resource.TestCheckResourceAttr(resourceName, "obfuscation_setting.0.obfuscation_setting_type", "DefaultObfuscation"),
),
},
{
Config: testAccSlotConfig_updateObfuscationSetting(rName, "None"),
Check: resource.ComposeTestCheckFunc(
testAccCheckSlotExists(ctx, resourceName, &slot),
resource.TestCheckResourceAttr(resourceName, "name", rName),
resource.TestCheckResourceAttrPair(resourceName, "bot_id", botLocaleName, "bot_id"),
resource.TestCheckResourceAttrPair(resourceName, "bot_version", botLocaleName, "bot_version"),
resource.TestCheckResourceAttrPair(resourceName, "locale_id", botLocaleName, "locale_id"),
resource.TestCheckResourceAttr(resourceName, "obfuscation_setting.#", "1"),
resource.TestCheckResourceAttr(resourceName, "obfuscation_setting.0.%", "1"),
resource.TestCheckResourceAttr(resourceName, "obfuscation_setting.0.obfuscation_setting_type", "None"),
),
},
},
})
}
Expand Down

0 comments on commit d0a2d34

Please sign in to comment.