Skip to content

Commit

Permalink
fix: correct show retention policies method name
Browse files Browse the repository at this point in the history
  • Loading branch information
Chenxulin97 committed Mar 3, 2024
1 parent 748b2a3 commit 79aef49
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion opengemini/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ type Client interface {
// rpConfig configuration information for retention policy
// isDefault can set the new retention policy as the default retention policy for the database
CreateRetentionPolicy(database string, rpConfig RpConfig, isDefault bool) error
ShowRetentionPolicy(database string) ([]RetentionPolicy, error)
ShowRetentionPolicies(database string) ([]RetentionPolicy, error)
DropRetentionPolicy(database, retentionPolicy string) error

ShowTagKeys(database, command string) ([]ValuesResult, error)
Expand Down
2 changes: 1 addition & 1 deletion opengemini/retention_policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func (c *client) CreateRetentionPolicy(database string, rpConfig RpConfig, isDef
}

// ShowRetentionPolicy Show retention policy
func (c *client) ShowRetentionPolicy(database string) ([]RetentionPolicy, error) {
func (c *client) ShowRetentionPolicies(database string) ([]RetentionPolicy, error) {
var (
ShowRetentionPolicy = "SHOW RETENTION POLICIES"
rpResult = make([]RetentionPolicy, 0)
Expand Down
2 changes: 1 addition & 1 deletion opengemini/retention_policy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func TestClientShowRetentionPolicy(t *testing.T) {
databaseName := randomDatabaseName()
err := c.CreateDatabase(databaseName)
require.Nil(t, err)
rpResult, err := c.ShowRetentionPolicy(databaseName)
rpResult, err := c.ShowRetentionPolicies(databaseName)
require.Nil(t, err)
require.NotEqual(t, len(rpResult), 0)
err = c.DropDatabase(databaseName)
Expand Down

0 comments on commit 79aef49

Please sign in to comment.