-
Notifications
You must be signed in to change notification settings - Fork 237
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move existing integration test to cmd package
So that we can organise the tests per sub-command/verb. The current `--help` test belongs to functionality in `root.go`. I've left the remaining contents of `circleci_cli_suite_test.go` so that you can run `ginkgo -r` from the root of the repo. The `main` package should be so simple that we don't need any specs there though.
- Loading branch information
Showing
3 changed files
with
28 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package cmd_test | ||
|
||
import ( | ||
"testing" | ||
|
||
. "github.com/onsi/ginkgo" | ||
. "github.com/onsi/gomega" | ||
"github.com/onsi/gomega/gexec" | ||
) | ||
|
||
var pathCLI string | ||
|
||
var _ = BeforeSuite(func() { | ||
var err error | ||
pathCLI, err = gexec.Build("github.com/circleci/circleci-cli") | ||
Ω(err).ShouldNot(HaveOccurred()) | ||
}) | ||
|
||
var _ = AfterSuite(func() { | ||
gexec.CleanupBuildArtifacts() | ||
}) | ||
|
||
func TestCmd(t *testing.T) { | ||
RegisterFailHandler(Fail) | ||
RunSpecs(t, "Cmd Suite") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters