Skip to content

Commit

Permalink
Fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
abarabash-sift authored and detro committed Oct 20, 2024
1 parent e40b6d7 commit f74df1a
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ jobs:
image: zookeeper:3.5
ports:
- 2181:2181
env:
ZOO_MAX_CLIENT_CNXNS: 200
strategy:
fail-fast: false
matrix:
Expand Down
5 changes: 5 additions & 0 deletions internal/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,11 @@ func (c *Client) Update(path string, data []byte, acl []zk.ACL) (*ZNode, error)
return c.Read(path)
}

// Close the connection.
func (c *Client) Close() {
c.zkConn.Close()
}

// Delete the given ZNode.
//
// Note that will also delete any child ZNode, recursively.
Expand Down
6 changes: 3 additions & 3 deletions internal/provider/data_source_znode.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,19 +37,19 @@ func datasourceZNode() *schema.Resource {
Schema: map[string]*schema.Schema{
"scheme": {
Type: schema.TypeString,
Required: true,
Computed: true,
Description: "The ACL scheme, such as 'world', 'digest', " +
"'ip', 'x509'.",
},
"id": {
Type: schema.TypeString,
Required: true,
Computed: true,
Description: "The ID for the ACL entry. For example, " +
"user:hash in 'digest' scheme.",
},
"permissions": {
Type: schema.TypeInt,
Required: true,
Computed: true,
Description: "The permissions for the ACL entry, " +
"represented as an integer bitmask.",
},
Expand Down
1 change: 0 additions & 1 deletion internal/provider/data_source_znode_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ func TestAccDataSourceZNode(t *testing.T) {
data = "Forza Napoli!"
}
data "zookeeper_znode" "dst" {
depends_on = [zookeeper_znode.src]
path = zookeeper_znode.src.path
}`, srcPath,
),
Expand Down
1 change: 1 addition & 0 deletions internal/provider/provider_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,6 @@ func confirmAllZNodeDestroyed(s *terraform.State) error {
}
}

zkClient.Close()
return nil
}

0 comments on commit f74df1a

Please sign in to comment.