Skip to content

Commit

Permalink
fixup imports
Browse files Browse the repository at this point in the history
Signed-off-by: Nitin Ravindran <nitin.ravindran@broadcom.com>
  • Loading branch information
aramprice authored and xtreme-nitin-ravindran committed Jul 18, 2024
1 parent a963299 commit 7df46f6
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 15 deletions.
7 changes: 4 additions & 3 deletions commandparser/construct.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@ import (
"path/filepath"
"strings"

"github.com/google/subcommands"
"github.com/vmware/govmomi/guest"
"github.com/vmware/govmomi/object"

"github.com/cloudfoundry/stembuild/construct/config"
vcenterclientfactory "github.com/cloudfoundry/stembuild/iaas_cli/iaas_clients/factory"
"github.com/cloudfoundry/stembuild/iaas_cli/iaas_clients/guest_manager"
"github.com/cloudfoundry/stembuild/iaas_cli/iaas_clients/vcenter_manager"
"github.com/google/subcommands"
"github.com/vmware/govmomi/guest"
"github.com/vmware/govmomi/object"
)

//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -generate
Expand Down
3 changes: 2 additions & 1 deletion iaas_cli/iaas_clients/vcenter_manager/vcenter_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@ import (
"path"
"strings"

"github.com/cloudfoundry/stembuild/iaas_cli/iaas_clients/guest_manager"
"github.com/vmware/govmomi/find"
"github.com/vmware/govmomi/guest"
"github.com/vmware/govmomi/object"
"github.com/vmware/govmomi/vim25"
"github.com/vmware/govmomi/vim25/types"

"github.com/cloudfoundry/stembuild/iaas_cli/iaas_clients/guest_manager"
)

//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -generate
Expand Down
8 changes: 4 additions & 4 deletions integration/construct/construct_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,18 @@ import (
"testing"
"time"

"github.com/cloudfoundry/stembuild/remotemanager"
"github.com/cloudfoundry/stembuild/test/helpers"
"github.com/concourse/pool-resource/out"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
"github.com/vmware/govmomi/govc/cli"
_ "github.com/vmware/govmomi/govc/device"
_ "github.com/vmware/govmomi/govc/importx"
_ "github.com/vmware/govmomi/govc/vm"
_ "github.com/vmware/govmomi/govc/vm/guest"
_ "github.com/vmware/govmomi/govc/vm/snapshot"

. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
"github.com/cloudfoundry/stembuild/remotemanager"
"github.com/cloudfoundry/stembuild/test/helpers"
)

func TestConstruct(t *testing.T) {
Expand Down
5 changes: 3 additions & 2 deletions integration/construct/construct_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ import (
"path/filepath"
"time"

"github.com/cloudfoundry/stembuild/test/helpers"

. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/onsi/gomega/gbytes"
. "github.com/onsi/gomega/gexec"

"github.com/cloudfoundry/stembuild/test/helpers"
)

const (
Expand All @@ -31,6 +31,7 @@ var _ = Describe("stembuild construct", func() {
AfterEach(func() {
_ = os.Remove(filepath.Join(workingDir, "LGPO.zip"))
})

Context("run successfully", func() {
BeforeEach(func() {
err := CopyFile(filepath.Join(workingDir, "assets", "LGPO.zip"), filepath.Join(workingDir, "LGPO.zip"))
Expand Down
2 changes: 1 addition & 1 deletion remotemanager/winrm_rebootchecker.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func NewRebootChecker(winrmRemoteManager RemoteManager) *RebootChecker {
return &RebootChecker{winrmRemoteManager}
}

// Inspired by Hashicorp Packer waitForRestart
// RebootHasFinished inspired by Hashicorp Packer waitForRestart
func (rc *RebootChecker) RebootHasFinished() (bool, error) {

exitCode, err := rc.remoteManager.ExecuteCommand(tryCheckReboot)
Expand Down
8 changes: 4 additions & 4 deletions remotemanager/winrm_remotemanager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ import (
"net/url"
"strconv"

"github.com/cloudfoundry/stembuild/remotemanager"
"github.com/cloudfoundry/stembuild/remotemanager/remotemanagerfakes"
"github.com/masterzen/winrm"

. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/onsi/gomega/ghttp"

"github.com/cloudfoundry/stembuild/remotemanager"
"github.com/cloudfoundry/stembuild/remotemanager/remotemanagerfakes"
)

func setupTestServer() *Server {
Expand Down Expand Up @@ -153,6 +153,7 @@ var _ = Describe("WinRM RemoteManager", func() {

Expect(err).NotTo(HaveOccurred())
})

It("returns error if winrmclient cannot be created", func() {
winRMClientFactory := new(remotemanagerfakes.FakeWinRMClientFactoryI)
buildError := errors.New("unable to build a client")
Expand All @@ -176,7 +177,6 @@ var _ = Describe("WinRM RemoteManager", func() {

Expect(err).To(HaveOccurred())
Expect(err).To(MatchError(fmt.Errorf("failed to create winrm shell: some shell creation error")))

})
})
})

0 comments on commit 7df46f6

Please sign in to comment.