Skip to content

Commit

Permalink
🐛 fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
chris-rock committed Nov 5, 2023
1 parent 562feaf commit 7b5d230
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions internal/provider/registration_token.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ type RegistrationTokenResourceModel struct {

// registration token details
Description types.String `tfsdk:"description"`
NoExpiration types.Bool `tfsdk:"no_exipration"`
NoExpiration types.Bool `tfsdk:"no_expiration"`
ExpiresIn types.String `tfsdk:"expires_in"`

// output
Expand Down Expand Up @@ -77,7 +77,7 @@ func (r *RegistrationTokenResource) Schema(ctx context.Context, req resource.Sch
stringplanmodifier.UseStateForUnknown(),
},
},
"no_exipration": schema.BoolAttribute{ // TODO: add check that either no_exipration or expires_in needs to be set
"no_expiration": schema.BoolAttribute{ // TODO: add check that either no_expiration or expires_in needs to be set
MarkdownDescription: "Example configurable attribute with default value",
Optional: true,
},
Expand Down
5 changes: 4 additions & 1 deletion internal/provider/space_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,10 @@ func (r *SpaceResource) Create(ctx context.Context, req resource.CreateRequest,

// Save space mrn into the Terraform state.
data.Name = types.StringValue(string(createMutation.CreateSpace.Name))
data.SpaceID = types.StringValue(createMutation.CreateSpace.Id.(string))
id, ok := createMutation.CreateSpace.Id.(string)
if ok {
data.SpaceID = types.StringValue(id)
}

// Write logs using the tflog package
tflog.Trace(ctx, "created a space resource")
Expand Down

0 comments on commit 7b5d230

Please sign in to comment.