this changes globalFlags to be a ulext.External
interface value that is passed to each command.
rather than have the ulext.External have a Setup
call in the way that the projectProvider used to
we make all of the state arguments to the functions
and have the commands call setup themselves.
the reason it is in its own package is so that
cmd/uplinkng can import cmd/uplinkng/ultest
but cmd/uplinkng/ultest needs to refer to whatever
the interface type is to call the function that
creates the commands.
there's also quite a bit of shuffling around of
code and names. sorry if that makes it tricky
to review. there should be no logic changes, though.
a side benefit is there's no longer a need to do
a type assertion in ultest to make it set the
fake filesystem to use. that can be passed in
directly now. additionally, this makes the
access commands much easier to test.
Change-Id: I29cf6a2144248a58b7a605a7ae0a5ada5cfd57b6
this implements the rm command which has to add
a Remove method to the fileystem interface and
implement it for local, remote and test filesystems.
Change-Id: Id41add28f01938893530aae0b4b73c8954e9b715
this adds a helper method to prompt for a line of
input using the clingy context to the global flag
state that errors if interactive mode is disabled.
Change-Id: Ie113c8920dfa4719e85cc24f11401d91b32812f9
this adds some stuff to ultest so that the set of
files created by a test can be inspected after so
that we can write some tests for the cp command
to observe that it does what it is supposed to do.
Change-Id: I98b8fb214058140dfbb117baa7acea6a2cc340e1
the directory was starting to get pretty large and
it was making it hard to pick concise names for
types and variables. this moves the location
stuff into a cmd/uplinkng/ulloc package, the
filesystem stuff into a cmd/uplinkng/ulfs package,
and the testing stuff into a cmd/uplinkng/ultest
package.
this should make the remaining stuff in cmd/uplinkng
only the business logic of how to implement the
commands, rather than also including a bunch of
helper utilities and scaffolding.
Change-Id: Id0901625ebfff9b1cf2dae52366aceb3b6c8f5b6
this adds a test framework with fake implementations of a
filesystem so that unit tests can be written asserting
the output of different command invocations as well as
the effects they have on a hypothetical filesystem and
storj network.
it also implements the mb command lol
Change-Id: I134c7ea6bf34f46192956c274a96cb5df7632ac0