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

Whole-tool tests #148

Closed
jbenet opened this issue Oct 10, 2014 · 8 comments
Closed

Whole-tool tests #148

jbenet opened this issue Oct 10, 2014 · 8 comments

Comments

@jbenet
Copy link
Member

jbenet commented Oct 10, 2014

We really need a test suite that exercises the ipfs tool from the cli. This way we can verify proper functioning of things.

@whyrusleeping
Copy link
Member

Where should it be located? I can start up something.

@jbenet
Copy link
Member Author

jbenet commented Oct 10, 2014

maybe cmd/ipfs/test/ ? or test/

On Thu, Oct 9, 2014 at 7:02 PM, Jeromy Johnson notifications@github.com
wrote:

Where should it be located? I can start up something.


Reply to this email directly or view it on GitHub
#148 (comment).

@whyrusleeping
Copy link
Member

cmd/ipfs/test sounds good to me

@chriscool
Copy link
Contributor

Maybe this could use an existing shell test framework like sharness:

https://github.com/mlafeldt/sharness

Sharness was extracted from the Git project, so I am familiar with how it works and I can start working on this.

And it is easy to use and to understand anyway.

@whyrusleeping
Copy link
Member

@chriscool That would be pretty sweet, ill take a look at sharness a little more, but if it came out the the git development, then im sure it will be good enough for us!

@jbenet
Copy link
Member Author

jbenet commented Oct 21, 2014

That looks very good. shell tests probably make sense for shell calls :). And, looks like it's TAP output instead of a custom fmt (yay).

@chriscool
Copy link
Contributor

Great, I will work on it this week end!

@jbenet
Copy link
Member Author

jbenet commented Jan 15, 2015

Thanks again for sharness @chriscool -- it has really saved us so many times.

@jbenet jbenet closed this as completed Jan 15, 2015
@aschmahmann aschmahmann mentioned this issue May 14, 2021
71 tasks
ariescodescream pushed a commit to ariescodescream/go-ipfs that referenced this issue Oct 23, 2021
@aschmahmann aschmahmann mentioned this issue Dec 1, 2021
80 tasks
laurentsenta pushed a commit to laurentsenta/kubo that referenced this issue Feb 25, 2022
* feat: make it possible to define optional durations
* test: empty/default optional durations
does not crash if user restores default value and sets it to empty string ""

* refactor: use null in JSON
* refactor(duration): use JSON null as the default

Rationale:
ipfs/go-ipfs-config#148 (comment)

* refactor: Duration → OptionalDuration

This makes it possible to use OptionalDuration with `json:",omitempty"`
so the null is not serialized to JSON, and get working WithDefault as well.

Co-authored-by: Marcin Rataj <lidel@lidel.org>
laurentsenta pushed a commit to laurentsenta/kubo that referenced this issue Feb 25, 2022
* feat: make it possible to define optional durations
* test: empty/default optional durations
does not crash if user restores default value and sets it to empty string ""

* refactor: use null in JSON
* refactor(duration): use JSON null as the default

Rationale:
ipfs/go-ipfs-config#148 (comment)

* refactor: Duration → OptionalDuration

This makes it possible to use OptionalDuration with `json:",omitempty"`
so the null is not serialized to JSON, and get working WithDefault as well.

Co-authored-by: Marcin Rataj <lidel@lidel.org>
laurentsenta pushed a commit to laurentsenta/kubo that referenced this issue Mar 4, 2022
* feat: make it possible to define optional durations
* test: empty/default optional durations
does not crash if user restores default value and sets it to empty string ""

* refactor: use null in JSON
* refactor(duration): use JSON null as the default

Rationale:
ipfs/go-ipfs-config#148 (comment)

* refactor: Duration → OptionalDuration

This makes it possible to use OptionalDuration with `json:",omitempty"`
so the null is not serialized to JSON, and get working WithDefault as well.

Co-authored-by: Marcin Rataj <lidel@lidel.org>
laurentsenta pushed a commit to laurentsenta/kubo that referenced this issue Mar 4, 2022
* feat: make it possible to define optional durations
* test: empty/default optional durations
does not crash if user restores default value and sets it to empty string ""

* refactor: use null in JSON
* refactor(duration): use JSON null as the default

Rationale:
ipfs/go-ipfs-config#148 (comment)

* refactor: Duration → OptionalDuration

This makes it possible to use OptionalDuration with `json:",omitempty"`
so the null is not serialized to JSON, and get working WithDefault as well.

Co-authored-by: Marcin Rataj <lidel@lidel.org>
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

No branches or pull requests

3 participants