Skip to content

Commit

Permalink
fix: cast description in utils role and fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Skraye committed Jun 5, 2024
1 parent a786a47 commit 5b82a88
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions internal/provider/resource_namespace_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,11 @@ func TestAccResourceNamespace(t *testing.T) {
),
concat(
"- type: io.kestra.core.tasks.log.Log",
" forced: false",
" values:",
" message: first {{flow.id}}",
"- type: io.kestra.core.tasks.debugs.Return",
" forced: false",
" values:",
" format: first {{flow.id}}",
),
Expand All @@ -51,9 +53,11 @@ func TestAccResourceNamespace(t *testing.T) {
),
concat(
"- type: io.kestra.core.tasks.log.Log",
" forced: false",
" values:",
" message: first {{flow.id}}",
"- type: io.kestra.core.tasks.debugs.Return",
" forced: false",
" values:",
" format: second {{flow.id}}",
),
Expand Down
2 changes: 1 addition & 1 deletion internal/provider/utils_role.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func roleApiToSchema(r map[string]interface{}, d *schema.ResourceData, c *Client
}
}

if _, ok := r["description"]; ok {
if _, ok := r["description"].(string); ok {
if err := d.Set("description", r["description"].(string)); err != nil {
return diag.FromErr(err)
}
Expand Down

0 comments on commit 5b82a88

Please sign in to comment.