Skip to content

Commit

Permalink
Fixed tests from different casing
Browse files Browse the repository at this point in the history
  • Loading branch information
JackyChiu committed Nov 22, 2017
1 parent 27c6df2 commit 64543bc
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions context_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -327,8 +327,8 @@ func TestCaseInsentitiveGOPATH(t *testing.T) {
h.TempDir("src/test1")
h.TempFile(filepath.Join("src/test1", ManifestName), `
[[constraint]]
name = github.com/foo/bar
branch = master`)
name = "github.com/foo/bar"
branch = "master"`)

// Shuffle letter case
rs := []rune(strings.ToLower(h.Path(".")))
Expand Down
3 changes: 2 additions & 1 deletion manifest.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ var (
errInvalidPrune = errors.Errorf("%q must be a TOML table of booleans", "prune")
errInvalidPruneProject = errors.Errorf("%q must be a TOML array of tables", "prune.project")
errInvalidMetadata = errors.New("metadata should be a TOML table")
errInvalidProjectRoot = errors.New("ProjectRoot name validation failed")

errInvalidProjectRoot = errors.New("ProjectRoot name validation failed")

errInvalidPruneValue = errors.New("prune options values must be booleans")
errPruneSubProject = errors.New("prune projects should not contain sub projects")
Expand Down
6 changes: 3 additions & 3 deletions manifest_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -344,11 +344,11 @@ func TestValidateManifest(t *testing.T) {
nick = "foo"
`,
wantWarn: []error{
errors.New("Invalid key \"location\" in \"constraint\""),
errors.New("Invalid key \"link\" in \"constraint\""),
errors.New("invalid key \"location\" in \"constraint\""),
errors.New("invalid key \"link\" in \"constraint\""),
errors.New("metadata in \"constraint\" should be a TOML table"),
errors.New("branch, version, revision, or source should be provided for \"github.com/foo/bar\""),
errors.New("Invalid key \"nick\" in \"override\""),
errors.New("invalid key \"nick\" in \"override\""),
errNoName,
},
wantError: nil,
Expand Down

0 comments on commit 64543bc

Please sign in to comment.