-
Notifications
You must be signed in to change notification settings - Fork 0
Update json payload query support #26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
assert.Equal(t, newExample.EncryptedIntField, example.EncryptedIntField, "EncryptedIntField does not match") | ||
assert.Equal(t, newExample.EncryptedTextField, example.EncryptedTextField, "EncryptedTextField does not match") | ||
assert.Equal(t, newExample.EncryptedJsonbField, example.EncryptedJsonbField, "EncryptedJsonbField does not match") | ||
assert.Equal(t, newExample.NonEncryptedField, returnedExample.NonEncryptedField, "NonEncryptedField does not match") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated these assertions as the expected value should be the first value in the assertion.
func assert.Equal(t assert.TestingT, expected interface{}, actual interface{}, msgAndArgs ...interface{}) bool
EncryptedIntField: 23, | ||
EncryptedTextField: "another string that shouldn't be returned", | ||
EncryptedJsonbField: jsonData, | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added another example to insert to ensure failures are picked up
https://cipherstash.slack.com/archives/C05CX3G2YQY/p1729475070543969
@@ -119,7 +125,7 @@ func TestMatchQueryLongString(t *testing.T) { | |||
t.Errorf("Expected has to equal true, got: %v", has) | |||
} | |||
|
|||
assert.Equal(t, returnedExample.EncryptedTextField, EncryptedTextField("this is a long string"), "EncryptedTextField should match") | |||
assert.Equal(t, EncryptedTextField("this is a long string"), returnedExample.EncryptedTextField, "EncryptedTextField should match") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as above, expected should be first in the assertion
c74b111
to
9366f2e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work @fimac, thanks for putting this together.
I have added some commits to simplify and make the code and docs a little more idiomatic.
Updates the payload to include a q value.
Adds query functions to use for each type to serialize the query into the required format.
Updates goeql tests.
Points eql sql install to central release folder that contains the latest sql for eql.