You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[LIB][BUG] (*node.Tree).Sync() is not working properly.
Summary:
There was a few bugs detected by adding a simple integration test:
- The scanner created from the response body was not working properly, it was never making it inside of the for loop.
- The checkpoint is not necessarily present on every line, so by updating it on every line, we were ending up removing the Checkpoint completely and thus getting stuck in a sync loop.
- Forcing a complete reset if the parents have changed was not optimal nor the right thing to do.
fixes T14
Test Plan:
Travis-CI is happy.
AND
STR:
- Delete the current cache located at `~/Library/Caches/com.appspot.go-acd.cache` on Mac.
- Run the `ls` command implemented in T5, this should create the cache
- Upload a new folder using the [Amazon Cloud Drive Web UI](https://www.amazon.com/clouddrive)
- Run the `ls` command to list the recently uploaded folder
Expected:
The files in the newly created folder are listed.
Actual:
The library is returning `node not found`
```
kalbasit@cratos ~/code/src/gopkg.in/acd.v0 [T5 *] ± % go run cmd/acd/main.go ls acd:///pictures
panic: node not found
goroutine 1 [running]:
gopkg.in/acd.v0/cli.lsAction(0xc2082037a0)
/Users/kalbasit/code/src/gopkg.in/acd.v0/cli/ls.go:31 +0x126
github.com/codegangsta/cli.(*App).RunAsSubcommand(0xc20806d400, 0xc208080000, 0x0, 0x0)
/Users/kalbasit/code/src/github.com/codegangsta/cli/app.go:262 +0xc8c
github.com/codegangsta/cli.Command.startApp(0x39c8b0, 0x2, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3d2590, 0x17, 0x444190, ...)
/Users/kalbasit/code/src/github.com/codegangsta/cli/command.go:183 +0x505
github.com/codegangsta/cli.Command.Run(0x39c8b0, 0x2, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3d2590, 0x17, 0x444190, ...)
/Users/kalbasit/code/src/github.com/codegangsta/cli/command.go:45 +0x14ee
github.com/codegangsta/cli.(*App).Run(0xc20806c200, 0xc20800a000, 0x3, 0x3, 0x0, 0x0)
/Users/kalbasit/code/src/github.com/codegangsta/cli/app.go:160 +0xd0c
github.com/codegangsta/cli.(*App).RunAndExitOnError(0xc20806c200)
/Users/kalbasit/code/src/github.com/codegangsta/cli/app.go:171 +0x57
main.main()
/Users/kalbasit/code/src/gopkg.in/acd.v0/cmd/acd/main.go:7 +0x2c
goroutine 17 [syscall, locked to thread]:
runtime.goexit()
/usr/local/Cellar/go/1.4.2/libexec/src/runtime/asm_amd64.s:2232 +0x1
exit status 2
```
Reviewers: #go_amazon_cloud_drive, kalbasit
Reviewed By: #go_amazon_cloud_drive, kalbasit
Maniphest Tasks: T14
Differential Revision: http://phabricator.nasreddine.com/D11
0 commit comments