Giter Club home page Giter Club logo

Comments (4)

seelder avatar seelder commented on August 14, 2024

I think maybe I can work on this one? I haven't used gomock before, but it looks like BinaryArtifacts uses a lot of the same functions as DangerousWorkflow so hopefully I can figure it out.

from scorecard.

spencerschrock avatar spencerschrock commented on August 14, 2024

DangerousWorkflow should be a good template, but happy to answer any questions as needed

from scorecard.

seelder avatar seelder commented on August 14, 2024

(@spencerschrock) - currently the ListLicenses function for the localDirRepo client throws an Unsupported Feature error, which is then handled by the raw license check. Options I see include

  1. create a mock that just throws an UnsupportedFeature error, similar to the existing functionality (I already have a working version of this, I think)

  2. create a mock that actually returns something from ListLicenses, however, that would replicate a lot of the existing functionality for handling these cases in the check itself

  3. Testing both 1 and 2 using different test cases with different mocks (adding a couple test cases to do so), although it seems like the difference in functionality should be tested in the raw/checks/license_test rather than here, so this might involve some other test design decisions

My questions are along the lines of - Is the functionality in the license check that handles an unsupportedFeature for listLicenses intended to be permanent? Are any of the options above preferable given the test designs for the project?

I am probably over-thinking this. If so and if option 1 is fine, I can go ahead and submit a PR.

Thanks!

from scorecard.

spencerschrock avatar spencerschrock commented on August 14, 2024

Option (1) sounds reasonable and a more direct translation of the existing tests, and would be a good first PR.

Depending on how much you want to do, creating a separate test which uses ListLicenses (effectively option 3) also sounds good.

from scorecard.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.