dignifiedquire / randor

Big Bad Tests for IPFS
2 stars 0 forks source link

add test for 'ipfs files mkdir -p' #19

Open whyrusleeping opened 8 years ago

whyrusleeping commented 8 years ago

We want to stress mkdir with and without the -p option. And also want to make sure that both get called on directories that already exist (to assert that nothing happens, and their contents don't change).

Also want to make sure we run mkdir -p on paths that already partially exist (i.e. mkdir -p a/b/c/dwhen a/b already exists)

dignifiedquire commented 8 years ago

whaaat mkdir has the p flag?? And there I was generating this behaviour manually...

dignifiedquire commented 8 years ago

Doing this manually without the -p flag right now: https://github.com/dignifiedquire/randor/blob/master/lib/operations/files-write.js#L41

Testing mkdir on dirs that already exists is a bit annoying because of the error thrown, but can be done.

whyrusleeping commented 8 years ago

Yeah, using mkdir -p on dirs that already exists won't throw an error, And thats the operation i'm more interested in