Giter Site home page Giter Site logo

Comments (9)

Skarlso avatar Skarlso commented on May 17, 2024 1

This is just like the store needs to be an interface in order to test stuff at the unit level instead of using a really bolt db. And have some end to end tests that actually use bolt db. :-)

from gaia.

Skarlso avatar Skarlso commented on May 17, 2024 1

Ah so that I can test the pull on repo change functionality of the update pipeline on code change feature. :-)

Well, just because other people do it doesn't mean Gaia has to do it. :-)

Generally I think that a unit test is a test where your have full control over all the moving parts. An integration test is where you have a third party of any kind. Generally what I don't want is a test failing because github happens to not be available or throttling us. An integration test is fine frol failing that way. But not a unit test. A unit test should run without Internet in the extremes.

from gaia.

michelvocks avatar michelvocks commented on May 17, 2024 1

Alright, good point. Didn't thought about the pull on repo change test. 😄

from gaia.

Skarlso avatar Skarlso commented on May 17, 2024 1

In test:

https://github.com/gaia-pipeline/gaia/blob/master/pipeline/git_test.go#L252

Using this pattern to mock out a certain part of an API by wrapping it into an interface:

https://github.com/gaia-pipeline/gaia/blob/master/pipeline/git.go#L168-L194

from gaia.

michelvocks avatar michelvocks commented on May 17, 2024

What's bad about cloning stuff? 😄
I mean, that's the real use-case and we can easily test it. What are the disadvantages in your opinion? 🤗

from gaia.

Skarlso avatar Skarlso commented on May 17, 2024

Generally it's frowned upon if you poll github a lot and Gods know they need a break. :-) we need end to end tests don't get me wrong. One or more but this scenario needs a push. Which means everytime someone runs this it will pull and push into a repo which is bad. We could mske this test with a switch to only run in Ci but better would be if all it would do is do it in memory.

from gaia.

michelvocks avatar michelvocks commented on May 17, 2024

Well. I know from other big projects they are also pulling something (docker images, files from servers etc.) and a git clone is basically the same. We are downloading files from a server. I don't know if github has some kind of DDoS protection which will, at some point, lock you out but I'm pretty sure you will never hit that locally. 😄

Why do we need a push test? We do not provide any push functionality.

from gaia.

Skarlso avatar Skarlso commented on May 17, 2024

Fair enough, it's a new feature after all. :) 👍 Thanks. :)

from gaia.

Skarlso avatar Skarlso commented on May 17, 2024

This might not be an issue any longer as I found a way to nicely get around the github interface. I can do the same with git as well.

from gaia.

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.