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 list actions api #284

Merged
merged 1 commit into from
Mar 18, 2019
Merged

add list actions api #284

merged 1 commit into from
Mar 18, 2019

Conversation

dvoet
Copy link
Collaborator

@dvoet dvoet commented Mar 13, 2019

Ticket:

adding an api to list the user's actions on a resource to help with performance on the rawls get workspace call (which currently makes 5 api calls to sam)

PR checklist

  • I've followed the instructions if I've made any changes to the API, especially if they're breaking changes
  • I've updated the RC_XXX release ticket with any manual steps required to release this change
  • I've updated the FISMA documentation if I've made any security-related changes, including auth, encryption, or auditing

@coveralls
Copy link

Pull Request Test Coverage Report for Build 2919

  • 6 of 6 (100.0%) changed or added relevant lines in 1 file are covered.
  • 16 unchanged lines in 7 files lost coverage.
  • Overall coverage decreased (-0.1%) to 73.362%

Files with Coverage Reduction New Missed Lines %
src/main/scala/org/broadinstitute/dsde/workbench/sam/schema/JndiSchemaDAO.scala 1 27.87%
src/main/scala/org/broadinstitute/dsde/workbench/sam/google/GoogleGroupSynchronizer.scala 1 92.0%
src/main/scala/org/broadinstitute/dsde/workbench/sam/model/SamModel.scala 2 95.24%
src/main/scala/org/broadinstitute/dsde/workbench/sam/google/GoogleExtensions.scala 2 63.19%
src/main/scala/org/broadinstitute/dsde/workbench/sam/service/UserService.scala 2 95.24%
src/main/scala/org/broadinstitute/dsde/workbench/sam/directory/LdapDirectoryDAO.scala 4 88.89%
src/main/scala/org/broadinstitute/dsde/workbench/sam/openam/LdapAccessPolicyDAO.scala 4 92.25%
Totals Coverage Status
Change from base Build 2917: -0.1%
Covered Lines: 1702
Relevant Lines: 2320

💛 - Coveralls


Get(s"/api/resources/v1/${resourceType.name}/foo/actions") ~> samRoutes.route ~> check {
status shouldEqual StatusCodes.OK
responseAs[Set[String]]
Copy link
Contributor

Choose a reason for hiding this comment

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

do you mean to do some assert on the response?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

no, this only checks that it can be parsed

Copy link
Contributor

Choose a reason for hiding this comment

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

Shall we check the actions with expected ones? or is it not feasible to do that?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

the purpose of the test is to check that the route exists, returns the right status code and the right format of data. Correctness of that data is tested by a service level test.

@dvoet dvoet merged commit f6bf0ec into develop Mar 18, 2019
@dvoet dvoet deleted the list_actions branch March 18, 2019 18:12
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.

3 participants