cmd/cmdtesting: rename from cmd/testing #7213

Merged
merged 1 commit into from Apr 7, 2017

Conversation

Projects
None yet
3 participants
Owner

rogpeppe commented Apr 7, 2017

Also move the command testing helpers from
the top level testing package.

This is because we don't want to add a cmd/modelcmd
dependency to juju/testing, but having cmd testing
helpers in one place seems like a Good Thing.

Left for the future: use the almost-identical github.com/juju/cmd/cmdtesting
throughout.

We rename the RunCommand that was currently in cmd/testing
to RunCommandWithDummyProvider to avoid the name clash.

We also needed to make the resource/cmd tests external because of
a dubious-looking import cycle caused by this import cycle:

package github.com/juju/juju/resource/cmd (test)
imports github.com/juju/juju/cmd/cmdtesting
imports github.com/juju/juju/provider/dummy
imports github.com/juju/juju/apiserver
imports github.com/juju/juju/resource/resourceadapters
imports github.com/juju/juju/resource/cmd

The apiserver package should really not import any cmd packages,
but that can be fixed some other day.

QA: no regressions.

mhilton approved these changes Apr 7, 2017

LGTM

Member

mhilton commented Apr 7, 2017

!!build!!

Owner

rogpeppe commented Apr 7, 2017

$$merge$$

Contributor

jujubot commented Apr 7, 2017

Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju

Contributor

jujubot commented Apr 7, 2017

Build failed: Tests failed
build url: http://juju-ci.vapour.ws:8080/job/github-merge-juju/10638

Owner

rogpeppe commented Apr 7, 2017

$$merge$$

Contributor

jujubot commented Apr 7, 2017

Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju

Contributor

jujubot commented Apr 7, 2017

Build failed: Tests failed
build url: http://juju-ci.vapour.ws:8080/job/github-merge-juju/10639

cmd/cmdtesting: rename from cmd/testing
Also move the command testing helpers from
the top level testing package.
Owner

rogpeppe commented Apr 7, 2017

$$merge$$

Contributor

jujubot commented Apr 7, 2017

Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju

@jujubot jujubot merged commit 83112fe into juju:develop Apr 7, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment