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

Swarm filters save config (fix #2878) #2880

Merged
merged 4 commits into from
Jun 21, 2016
Merged

Swarm filters save config (fix #2878) #2880

merged 4 commits into from
Jun 21, 2016

Conversation

yuvallanger
Copy link
Contributor

@yuvallanger yuvallanger commented Jun 20, 2016

Please review. (ref: #2878)

License: MIT
Signed-off-by: Yuval Langer <yuval.langer@gmail.com>
Also added types and marshalers to the swarmFiltersAddCmd and
swarmFiltersRmCmd structs.

License: MIT
Signed-off-by: Yuval Langer <yuval.langer@gmail.com>

if len(req.Arguments()) == 0 {
res.SetError(errors.New("no filters to add"), cmds.ErrClient)
return
Copy link
Member

Choose a reason for hiding this comment

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

Move this before opening the repo

License: MIT
Signed-off-by: Yuval Langer <yuval.langer@gmail.com>
@Kubuxu
Copy link
Member

Kubuxu commented Jun 20, 2016

To prevent future regressions it would be great to have test cases for this behaviour, please check test/sharness/t0141-addfilter.sh and write testcase that will be testing fixed behaviour.

Apart from that it looks quite good.

@yuvallanger
Copy link
Contributor Author

Added tests to test/sharness/t0141-addfilter.sh.
@Kubuxu LFCR

License: MIT
Signed-off-by: Yuval Langer <yuval.langer@gmail.com>
@yuvallanger
Copy link
Contributor Author

yuvallanger commented Jun 21, 2016

touch does not truncates an existing file. Filter addresses are only added to the list_expected file with each call to test_config_swarm_addrfilters_cmd. printf "" > list_expected works pretty well in this case.

@Kubuxu
Copy link
Member

Kubuxu commented Jun 21, 2016

LGTM

@Kubuxu Kubuxu added the RFM label Jun 21, 2016
@whyrusleeping
Copy link
Member

LGTM, thanks @yuvallanger

@whyrusleeping whyrusleeping merged commit 7d18f74 into ipfs:master Jun 21, 2016
@yuvallanger yuvallanger deleted the swarm-filters-save-config branch September 3, 2017 11:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants