Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix linode tests #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions provision/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ require (
github.com/google/uuid v1.1.1
github.com/hashicorp/go-retryablehttp v0.6.6
github.com/hetznercloud/hcloud-go v1.18.2
github.com/inlets/inletsctl v0.0.0-20210119121609-ba39a5f3caa6
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There should be no circular dependencies. Why is this needed?

github.com/linode/linodego v0.19.0
github.com/morikuni/aec v1.0.0
github.com/packethost/packngo v0.5.1
Expand Down
3 changes: 3 additions & 0 deletions provision/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,9 @@ github.com/imdario/mergo v0.3.5 h1:JboBksRwiiAJWvIYJVo46AfV+IAIKZpfrSzVKj42R4Q=
github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA=
github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM=
github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
github.com/inlets/cloud-provision/provision v0.0.0-20210119113012-d52e792ff883/go.mod h1:rPw1T222Ik54glKeMngP7fhALekMf6Qhh7Z+/W1h/pc=
github.com/inlets/inletsctl v0.0.0-20210119121609-ba39a5f3caa6 h1:PVgjbMW04bs0U88oyU/kR+50PJf7sxX+Z2mrm3ht95o=
github.com/inlets/inletsctl v0.0.0-20210119121609-ba39a5f3caa6/go.mod h1:+/ZvJypltbv5jbWVOdPGaqagmENWNWuzlTiaI+mf3sQ=
github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af h1:pmfjZENx5imkbgOkpRUYLnmbU7UEFbjtDA2hxJ1ichM=
github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k=
github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
Expand Down
9 changes: 5 additions & 4 deletions provision/linode_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@ import (
"testing"

"github.com/golang/mock/gomock"
"github.com/inlets/inletsctl/mock"

"github.com/linode/linodego"
)

func Test_Linode_Provision(t *testing.T) {
mockCtrl := gomock.NewController(t)
defer mockCtrl.Finish()
mockClient := newMockLinodeInterface(mockCtrl)
mockClient := mock.NewMockLinodeInterface(mockCtrl)
provisioner := &LinodeProvisioner{
client: mockClient,
}
Expand Down Expand Up @@ -70,7 +71,7 @@ func Test_Linode_Provision(t *testing.T) {
func Test_Linode_StatusBooting(t *testing.T) {
mockCtrl := gomock.NewController(t)
defer mockCtrl.Finish()
mockClient := newMockLinodeInterface(mockCtrl)
mockClient := mock.NewMockLinodeInterface(mockCtrl)
provisioner := &LinodeProvisioner{
client: mockClient,
}
Expand All @@ -96,7 +97,7 @@ func Test_Linode_StatusBooting(t *testing.T) {
func Test_Linode_StatusActive(t *testing.T) {
mockCtrl := gomock.NewController(t)
defer mockCtrl.Finish()
mockClient := newMockLinodeInterface(mockCtrl)
mockClient := mock.NewMockLinodeInterface(mockCtrl)
provisioner := &LinodeProvisioner{
client: mockClient,
stackscriptID: 10,
Expand Down Expand Up @@ -126,7 +127,7 @@ func Test_Linode_StatusActive(t *testing.T) {
func Test_Linode_Delete(t *testing.T) {
mockCtrl := gomock.NewController(t)
defer mockCtrl.Finish()
mockClient := newMockLinodeInterface(mockCtrl)
mockClient := mock.NewMockLinodeInterface(mockCtrl)
provisioner := &LinodeProvisioner{
client: mockClient,
}
Expand Down