Had to handle a lot of implicit leaning on a few properties of the old
representation:
* Old representation allowed plain strings to be treated as lists
without problem (i.e. shoved into strings.Split), now strings need to
be checked whether they are a list before they are treated as one
(i.e. shoved into StringList(s).Slice()).
* Tested behavior of 0 and 1 length lists in formatlist() was a side
effect of the representation. Needs to be special cased now to
maintain the behavior.
* Found a pretty old context test failure that was wrong in several
different ways. It's covered by TestContext2Apply_multiVar so I
removed it.
This is the initial pure "all tests passing without a diff" stage. The
plan is to change the internal representation of StringList to include a
suffix delimiter, which will allow us to recognize empty and
single-element lists.
favor of attempting to detect if the initial container ever enters
running state, and erroring out if not. It will re-check the container
once every 500ms for 15 seconds total; future work could make that
configurable.
The SSH agent thing applies to all provisioners using the `ssh`
connection type, so it would be misleading to specifically write it
related to the `remote-exec` provisioner.
Links cause there to be more than one name for a container to be
returned. As a result, only looking at the first element of the
container names could cause a container to not be found, leading
Terraform to remove it from state and attempt to recreate it.
the Docker API get those containers running. Otherwise when
you try to start a container linking to them, the start command
will fail, leading to an error.
As discussed with @mitchellh and @phinze we don’t need to randomize in
order to get infinite ID’s. When we hit the highest possible number and
add `1` it will just wrap back to `0`, which is just fine with regards
to how Terraform works and uses these ID’s.
Tested this by setting the initial value of `m.nextId` to `4294967293`
where the maximum is `4294967295 `. So with some additional logging it
clearly showed it wrapped and continued without any issues.