Fix spelling error
Fix vestigial help string from the multi-backend refactor

In the end, the decision was to not attempt to make the credential
situation for each storage backend to appear hold too much in common,
because in practice, they do not: Swift has a litany of tunables, and
AWS has the AWS_SECURITY_TOKEN stuff, and so on.
Minimize the amount of treatment of argv in 'cmd'

Remove some defaults and fallbacks about argv that were not used.
Because of the 'console_scripts' behavior of setuptools, 'cmd.main'
must be able to accept zero arguments and is going to read 'sys.argv'
anyway, which is also the default behavior of 'argparse'.

This breaks a use case of calling 'cmd.py' directly as a toplevel
entry point for the sake of testing, but no known parties do this.
Move pg_xlog test fixture to another file

Done in preparation to have it be shared with other integration
testing, and to communicate that it is a mechanism used by multiple
consumers (soon).
Add some black-box testing

For the first time, perform black box testing by (indirectly) calling
'cmd.main'.

The fixtures implemented here take of things like patching argv and
setting up a bucket to act as a target for the tests.

Besides improving coverage, the idea is that adding analogous
components to the class "AwsTestConfig" and then modifying
"_make_fixture_param_and_ids" will allow for easier, portable smoke
testing of more storage backend functionality.
Fix comments referring to obsolete symbol
Mock out checking for a psql binary in a blackbox test

This test is intended to exercise moving files around to S3 and back
and already goes through pains to nix integration with Postgres, so
finish the job and remove the dependency that 'psql' has to be
installed and able to log in.
Fix dangerous thinkos involving "StandardError"

StandardError is intended to include the built-in exceptions in
Python.

This was pernicious in the 'retries' module, as most errors were of
the form of timeouts, had an errno, and inherited from the built-in
EnvironmentError, yet other failure modes -- like
httplib.IncompleteRead -- would not inherit from StandardError, and
escape the retry.
Call fsync on newly restored files after a tar extract

Without this, a poorly timed whole-system crash (soon after "wal-e
backup-fetch" termination) could cause data corruption since there was
never an explicit request by WAL-E to the kernel to flush pages before
returning from 'backup-fetch'.

Editorialized by Daniel Farina <daniel@heroku.com>
Add htmlcov to .gitignore

This directory is generated by pytest-cov which gathers test coverage,
and it is unlikely anyone would want to commit it.
Don't spin in tight loops with sleep(0), wait 100ms

In principle sleep(0) is all that is necessary to allow another
greenlet to be scheduled, but when encountering defects in WAL-E --
particularly infinite loops -- this could cause unnecessary thrashing
by one's computer.

Sleeping for 100ms doesn't make tests take appreciably longer but does
prevent bugs from mercilessly spinning the CPU.
Add Greg Stark as a contributor
Refactor S3 credential configuration into a support function

This is in anticipation of having to make an alternate branch for IAM
instance profile support, which would otherwise bloat up and make
deeply nested branches in configure_backup_cxt.
Move STS support functions to s3_integration_help from test_aws_sts

In addition to the STS-exercising unit tests in test_aws_sts, these
support functions are useful in blackbox and simulation of AWS
instance profiles.

To reflect their shared nature, move them to s3_integration_help along
with other shared infrastructure.
Shorten default test bucket so STS policies can work

STS cannot make policies on "member" names over 32 characters.

Given the name of the test bucket is arbitrary, shorten it.
Unfortunately, it is more cryptic for purpose of inspection, but
so it goes.
Move AWS credential names to top-level in testing

To allow sharing by multiple AWS config parameter objects that may
deem it useful to scrub environment variables.
Refactor blackbox and how configuration and argv is injected

The goal is to allow the 'config' object to manipulate the argv under
test, rather than assuming the test should know how to construct argv
verbatim.

This reflects that argv can be used to set up some amount of WAL-E's
credential in addition to environment variables.

An upshot is that now that the 'main' procedure requires injection via
named fixture, also remove the magicalness of 'autouse=True'.
Remove dead attribute from AwsTestConfig
Replace S3 Credentials a boto's Provider type

This exploits the property that the 'creds' object is opaque to most
of WAL-E, except backend-specific portions.  boto's 'Provider' type is
similar enough to be used in the same way

In addition, the "provider" abstraction supports more features, such
as automatic credential refreshing when using IAM instance profile
support.

Editorialized by Daniel Farina <daniel@heroku.com>
Add support for AWS IAM Instance Profiles

By using the command line option --aws-instance-profile, WAL-E can
request and use credentials from the instance metadata.  This option
has high precedence and is mutually exclusive with assigning one's own
AWS credentials.

Editorialized by Daniel Farina <daniel@heroku.com>