Skip to content

Commit

Permalink
deps: update all imports to match new repo home.
Browse files Browse the repository at this point in the history
  • Loading branch information
jrasell committed Aug 14, 2020
1 parent 14fe129 commit 75a8cc6
Show file tree
Hide file tree
Showing 20 changed files with 48 additions and 73 deletions.
10 changes: 5 additions & 5 deletions command/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ import (
"fmt"
"strings"

"github.com/hashicorp/levant/helper"
"github.com/hashicorp/levant/levant"
"github.com/hashicorp/levant/levant/structs"
"github.com/hashicorp/levant/logging"
"github.com/hashicorp/levant/template"
nomad "github.com/hashicorp/nomad/api"
"github.com/jrasell/levant/helper"
"github.com/jrasell/levant/levant"
"github.com/jrasell/levant/levant/structs"
"github.com/jrasell/levant/logging"
"github.com/jrasell/levant/template"
)

// DeployCommand is the command implementation that allows users to deploy a
Expand Down
2 changes: 1 addition & 1 deletion command/deploy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package command
import (
"testing"

"github.com/jrasell/levant/template"
"github.com/hashicorp/levant/template"
)

func TestDeploy_checkCanaryAutoPromote(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions command/dispatch.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (
"os"
"strings"

"github.com/hashicorp/levant/levant"
"github.com/hashicorp/levant/logging"
flaghelper "github.com/hashicorp/nomad/helper/flag-helpers"
"github.com/jrasell/levant/levant"
"github.com/jrasell/levant/logging"
)

// DispatchCommand is the command implementation that allows users to
Expand Down
2 changes: 1 addition & 1 deletion command/meta.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"flag"
"io"

"github.com/jrasell/levant/helper"
"github.com/hashicorp/levant/helper"
"github.com/mitchellh/cli"
)

Expand Down
10 changes: 5 additions & 5 deletions command/plan.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import (
"fmt"
"strings"

"github.com/jrasell/levant/helper"
"github.com/jrasell/levant/levant"
"github.com/jrasell/levant/levant/structs"
"github.com/jrasell/levant/logging"
"github.com/jrasell/levant/template"
"github.com/hashicorp/levant/helper"
"github.com/hashicorp/levant/levant"
"github.com/hashicorp/levant/levant/structs"
"github.com/hashicorp/levant/logging"
"github.com/hashicorp/levant/template"
)

// PlanCommand is the command implementation that allows users to plan a
Expand Down
4 changes: 2 additions & 2 deletions command/render.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"os"
"strings"

"github.com/jrasell/levant/helper"
"github.com/jrasell/levant/template"
"github.com/hashicorp/levant/helper"
"github.com/hashicorp/levant/template"
)

// RenderCommand is the command implementation that allows users to render a
Expand Down
6 changes: 3 additions & 3 deletions command/scale_in.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package command
import (
"strings"

"github.com/jrasell/levant/levant/structs"
"github.com/jrasell/levant/logging"
"github.com/jrasell/levant/scale"
"github.com/hashicorp/levant/levant/structs"
"github.com/hashicorp/levant/logging"
"github.com/hashicorp/levant/scale"
)

// ScaleInCommand is the command implementation that allows users to scale a
Expand Down
6 changes: 3 additions & 3 deletions command/scale_out.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package command
import (
"strings"

"github.com/jrasell/levant/levant/structs"
"github.com/jrasell/levant/logging"
"github.com/jrasell/levant/scale"
"github.com/hashicorp/levant/levant/structs"
"github.com/hashicorp/levant/logging"
"github.com/hashicorp/levant/scale"
)

// ScaleOutCommand is the command implementation that allows users to scale a
Expand Down
22 changes: 5 additions & 17 deletions command/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ package command
import (
"fmt"

"github.com/jrasell/levant/buildtime"
"github.com/mitchellh/cli"
)

var _ cli.Command = &VersionCommand{}

// VersionCommand is a Command implementation that prints the version.
type VersionCommand struct {
Version string
VersionPrerelease string
UI cli.Ui
Version string
UI cli.Ui
}

// Help provides the help information for the version command.
Expand All @@ -26,18 +26,6 @@ func (c *VersionCommand) Synopsis() string {

// Run executes the version command.
func (c *VersionCommand) Run(_ []string) int {

v := fmt.Sprintf("Levant v%s", c.Version)

if c.VersionPrerelease != "" {
v = v + fmt.Sprintf("-%s", c.VersionPrerelease)
}

c.UI.Output(v)
c.UI.Output(fmt.Sprintf("Date: %s", buildtime.BuildDate))
c.UI.Output(fmt.Sprintf("Commit: %s", buildtime.GitCommit))
c.UI.Output(fmt.Sprintf("Branch: %s", buildtime.GitBranch))
c.UI.Output(fmt.Sprintf("State: %s", buildtime.GitState))
c.UI.Output(fmt.Sprintf("Summary: %s", buildtime.GitSummary))
fmt.Println(c.Version)
return 0
}
11 changes: 0 additions & 11 deletions command/version_test.go

This file was deleted.

4 changes: 2 additions & 2 deletions helper/files_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func TestHelper_GetDefaultTmplFile(t *testing.T) {

// Use write file as tmpfile adds a prefix which doesn't work with the
// GetDefaultTmplFile function.
err := ioutil.WriteFile(f, d1, 0644)
err := ioutil.WriteFile(f, d1, 0600)
if err != nil {
t.Fatal(err)
}
Expand Down Expand Up @@ -67,7 +67,7 @@ func TestHelper_GetDefaultVarFile(t *testing.T) {

// Use write file as tmpfile adds a prefix which doesn't work with the
// GetDefaultTmplFile function.
err := ioutil.WriteFile(tc.VarFile, d1, 0644)
err := ioutil.WriteFile(tc.VarFile, d1, 0600)
if err != nil {
t.Fatal(err)
}
Expand Down
4 changes: 2 additions & 2 deletions levant/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (
"strings"
"time"

"github.com/hashicorp/levant/client"
"github.com/hashicorp/levant/levant/structs"
nomad "github.com/hashicorp/nomad/api"
"github.com/jrasell/levant/client"
"github.com/jrasell/levant/levant/structs"
"github.com/pkg/errors"
"github.com/rs/zerolog/log"
)
Expand Down
2 changes: 1 addition & 1 deletion levant/dispatch.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package levant

import (
"github.com/hashicorp/levant/client"
nomad "github.com/hashicorp/nomad/api"
"github.com/jrasell/levant/client"
"github.com/rs/zerolog/log"
)

Expand Down
4 changes: 2 additions & 2 deletions levant/plan.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package levant
import (
"fmt"

"github.com/hashicorp/levant/client"
"github.com/hashicorp/levant/levant/structs"
nomad "github.com/hashicorp/nomad/api"
"github.com/jrasell/levant/client"
"github.com/jrasell/levant/levant/structs"
"github.com/rs/zerolog/log"
)

Expand Down
6 changes: 3 additions & 3 deletions scale/scale.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package scale

import (
"github.com/hashicorp/levant/client"
"github.com/hashicorp/levant/levant"
"github.com/hashicorp/levant/levant/structs"
nomad "github.com/hashicorp/nomad/api"
"github.com/jrasell/levant/client"
"github.com/jrasell/levant/levant"
"github.com/jrasell/levant/levant/structs"
"github.com/rs/zerolog/log"
)

Expand Down
2 changes: 1 addition & 1 deletion scale/scale_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package scale
import (
"testing"

"github.com/hashicorp/levant/levant/structs"
nomad "github.com/hashicorp/nomad/api"
"github.com/jrasell/levant/levant/structs"
)

func TestScale_updateTaskGroup(t *testing.T) {
Expand Down
9 changes: 4 additions & 5 deletions template/render.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,13 @@ import (
"io/ioutil"
"path"

"github.com/jrasell/levant/client"
"github.com/jrasell/levant/helper"
"github.com/rs/zerolog/log"
yaml "gopkg.in/yaml.v2"

"github.com/hashicorp/levant/client"
"github.com/hashicorp/levant/helper"
nomad "github.com/hashicorp/nomad/api"
"github.com/hashicorp/nomad/jobspec"
"github.com/hashicorp/terraform/config"
"github.com/rs/zerolog/log"
yaml "gopkg.in/yaml.v2"
)

// RenderJob takes in a template and variables performing a render of the
Expand Down
5 changes: 2 additions & 3 deletions test/acctest/acctest.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ func CheckTaskGroupCount(groupName string, count int) TestStateFunc {
}
}

// newNomadClient creates a Nomad API client configrable by NOMAD_
// newNomadClient creates a Nomad API client configurable by NOMAD_
// env variables or returns an error if Nomad is in an unhealthy state
func newNomadClient() (*nomad.Client, error) {
c, err := nomad.NewClient(nomad.DefaultConfig())
Expand All @@ -158,9 +158,8 @@ func newNomadClient() (*nomad.Client, error) {
return nil, err
}

if !resp.Server.Ok || !resp.Client.Ok {
if (resp.Server != nil && !resp.Server.Ok) || (resp.Client != nil && !resp.Client.Ok) {
return nil, fmt.Errorf("agent unhealthy")
}

return c, nil
}
6 changes: 3 additions & 3 deletions test/acctest/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package acctest
import (
"fmt"

"github.com/jrasell/levant/levant"
"github.com/jrasell/levant/levant/structs"
"github.com/jrasell/levant/template"
"github.com/hashicorp/levant/levant"
"github.com/hashicorp/levant/levant/structs"
"github.com/hashicorp/levant/template"
)

// DeployTestStepRunner implements TestStepRunner to execute a levant deployment
Expand Down
2 changes: 1 addition & 1 deletion test/deploy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package test
import (
"testing"

"github.com/jrasell/levant/test/acctest"
"github.com/hashicorp/levant/test/acctest"
)

func TestDeploy_basic(t *testing.T) {
Expand Down

0 comments on commit 75a8cc6

Please sign in to comment.