Skip to content
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

Add query parameters to input #786

Merged
merged 1 commit into from
Jun 18, 2018

Conversation

ashutosh-narkar
Copy link
Member

Closes #781

Signed-off-by: Ashutosh Narkar anarkar4387@gmail.com

"params": query,
}

if !reflect.DeepEqual(result, expectedResult) {
Copy link
Member

Choose a reason for hiding this comment

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

I think it would be better to compare the input against the AST or JSON representation of the input. As is, it's not easy to tell that the query params are being serialized correctly.

For example:

expected := util.MustUnmarshalJSON([]byte(`
{
  "path": ["foo","bar"],
  "method": "GET",
  "identity": "bob",
  "params": {"pretty": ["true"], "explain": ["full"]}
}
`)

if !reflect.DeepEqual(result, expected) { // error }

Copy link
Member

@tsandall tsandall left a comment

Choose a reason for hiding this comment

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

One minor change in the test case and then we can merge.

Closes open-policy-agent#781

Signed-off-by: Ashutosh Narkar <anarkar4387@gmail.com>
@tsandall
Copy link
Member

LGTM

@tsandall tsandall merged commit 530cb48 into open-policy-agent:master Jun 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants