Skip to content

Conversation

zhengjilei
Copy link

No description provided.

@ofekshenawa
Copy link
Collaborator

Hey,
Do you think you might be able to write a unit test that validates this? WDYT?

Copy link
Member

@ndyakov ndyakov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please check and address the comments that were left from @ofekshenawa and me.


// For a Lua script that includes a write command, the error string
// contains "-READONLY" rather than beginning with "READONLY "
return strings.Contains(redisError, "-READONLY")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we be more strict here? I assume one can easily use a command with working on a "something-readonly" key and trigger an error that will return true for containing "-readonly"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

3 participants