Skip to content

Commit

Permalink
fix: Field 'comment' not found in the schema (#214)
Browse files Browse the repository at this point in the history
* fix: Field 'comment' not found in the schema
Fixes #213

* test: Fix broken tests
  • Loading branch information
vaerh committed May 17, 2023
1 parent c519f27 commit 01a7f10
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
4 changes: 4 additions & 0 deletions routeros/datasource_ip_addresses.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ func DatasourceIPAddresses() *schema.Resource {
Type: schema.TypeString,
Computed: true,
},
KeyComment: {
Type: schema.TypeString,
Computed: true,
},
"disabled": {
Type: schema.TypeBool,
Computed: true,
Expand Down
5 changes: 5 additions & 0 deletions routeros/datasource_ip_routes.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package routeros

import (
"context"

"github.com/hashicorp/terraform-plugin-sdk/v2/diag"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
)
Expand Down Expand Up @@ -31,6 +32,10 @@ func DatasourceIPRoutes() *schema.Resource {
Type: schema.TypeBool,
Computed: true,
},
KeyComment: {
Type: schema.TypeString,
Computed: true,
},
"connect": {
Type: schema.TypeBool,
Computed: true,
Expand Down
4 changes: 3 additions & 1 deletion routeros/resource_capsman_configuration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ func TestAccCapsManConfigurationTest_basic(t *testing.T) {
{
Config: testAccCapsManConfigurationConfig(1),
Check: resource.ComposeTestCheckFunc(
resource.TestCheckResourceAttr("routeros_capsman_configuration.test_configuration_2",
"name", "test_configuration_2"),
resource.TestCheckResourceAttrSet("routeros_capsman_configuration.test_configuration_2",
"channel.config"),
resource.TestCheckResourceAttrSet("routeros_capsman_configuration.test_configuration_2",
Expand Down Expand Up @@ -103,7 +105,7 @@ resource "routeros_capsman_security" "test_security" {
}
resource "routeros_capsman_configuration" "test_configuration_2" {
name = "test_configuration"
name = "test_configuration_2"
channel = {
config = "${routeros_capsman_channel.test_channel.name}"
Expand Down

0 comments on commit 01a7f10

Please sign in to comment.