dep: Add harness tests for dep check

This commit is contained in:
sam boyer 2018-07-20 17:05:08 -07:00
Родитель 74eac2bb2b
Коммит 26fced1909
60 изменённых файлов: 436 добавлений и 0 удалений

12
cmd/dep/testdata/harness_tests/check/excess_inputs/final/Gopkg.lock сгенерированный поставляемый Normal file
Просмотреть файл

@ -0,0 +1,12 @@
# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'.
[solve-meta]
analyzer-name = "dep"
analyzer-version = 1
input-imports = [
"github.com/sdboyer/deptest",
"github.com/sdboyer/deptestdos",
]
solver-name = "gps-cdcl"
solver-version = 1

Просмотреть файл

12
cmd/dep/testdata/harness_tests/check/excess_inputs/initial/Gopkg.lock сгенерированный поставляемый Normal file
Просмотреть файл

@ -0,0 +1,12 @@
# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'.
[solve-meta]
analyzer-name = "dep"
analyzer-version = 1
input-imports = [
"github.com/sdboyer/deptest",
"github.com/sdboyer/deptestdos",
]
solver-name = "gps-cdcl"
solver-version = 1

Просмотреть файл

Просмотреть файл

@ -0,0 +1,12 @@
// Copyright 2017 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package main
import (
_ "github.com/sdboyer/deptestdos"
)
func main() {
}

3
cmd/dep/testdata/harness_tests/check/excess_inputs/stdout.txt поставляемый Normal file
Просмотреть файл

@ -0,0 +1,3 @@
# Gopkg.lock is out of sync:
github.com/sdboyer/deptest: in input-imports, but not imported

Просмотреть файл

@ -0,0 +1,7 @@
{
"commands": [
["check"]
],
"exit-code": 1,
"vendor-final": []
}

17
cmd/dep/testdata/harness_tests/check/hash_mismatch/final/Gopkg.lock сгенерированный поставляемый Normal file
Просмотреть файл

@ -0,0 +1,17 @@
# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'.
[[projects]]
digest = "1:ddbbbe7f7a81c86d54e89fa388b532f4c144d666a14e8e483ba04fa58265a246"
name = "github.com/sdboyer/deptest"
packages = ["."]
pruneopts = ""
revision = "ff2948a2ac8f538c4ecd55962e919d1e13e74baf"
version = "v1.0.0"
[solve-meta]
analyzer-name = "dep"
analyzer-version = 1
input-imports = ["github.com/sdboyer/deptest"]
solver-name = "gps-cdcl"
solver-version = 1

Просмотреть файл

17
cmd/dep/testdata/harness_tests/check/hash_mismatch/initial/Gopkg.lock сгенерированный поставляемый Normal file
Просмотреть файл

@ -0,0 +1,17 @@
# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'.
[[projects]]
digest = "1:ddbbbe7f7a81c86d54e89fa388b532f4c144d666a14e8e483ba04fa58265a246"
name = "github.com/sdboyer/deptest"
packages = ["."]
pruneopts = ""
revision = "ff2948a2ac8f538c4ecd55962e919d1e13e74baf"
version = "v1.0.0"
[solve-meta]
analyzer-name = "dep"
analyzer-version = 1
input-imports = ["github.com/sdboyer/deptest"]
solver-name = "gps-cdcl"
solver-version = 1

Просмотреть файл

Просмотреть файл

@ -0,0 +1,12 @@
// Copyright 2017 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package main
import (
_ "github.com/sdboyer/deptest"
)
func main() {
}

3
cmd/dep/testdata/harness_tests/check/hash_mismatch/initial/vendor/github.com/sdboyer/deptest/deptest.go сгенерированный поставляемый Normal file
Просмотреть файл

@ -0,0 +1,3 @@
package deptest
type Foo int

2
cmd/dep/testdata/harness_tests/check/hash_mismatch/stdout.txt поставляемый Normal file
Просмотреть файл

@ -0,0 +1,2 @@
# vendor is out of sync:
vendor/github.com/sdboyer/deptest: hash of vendored tree didn't match digest in Gopkg.lock

Просмотреть файл

@ -0,0 +1,9 @@
{
"commands": [
["check"]
],
"exit-code": 1,
"vendor-final": [
"github.com/sdboyer/deptest"
]
}

17
cmd/dep/testdata/harness_tests/check/hash_version_mismatch/final/Gopkg.lock сгенерированный поставляемый Normal file
Просмотреть файл

@ -0,0 +1,17 @@
# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'.
[[projects]]
digest = "2:ddbbbe7f7a81c86d54e89fa388b532f4c144d666a14e8e483ba04fa58265a246"
name = "github.com/sdboyer/deptest"
packages = ["."]
pruneopts = ""
revision = "ff2948a2ac8f538c4ecd55962e919d1e13e74baf"
version = "v1.0.0"
[solve-meta]
analyzer-name = "dep"
analyzer-version = 1
input-imports = ["github.com/sdboyer/deptest"]
solver-name = "gps-cdcl"
solver-version = 1

Просмотреть файл

17
cmd/dep/testdata/harness_tests/check/hash_version_mismatch/initial/Gopkg.lock сгенерированный поставляемый Normal file
Просмотреть файл

@ -0,0 +1,17 @@
# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'.
[[projects]]
digest = "2:ddbbbe7f7a81c86d54e89fa388b532f4c144d666a14e8e483ba04fa58265a246"
name = "github.com/sdboyer/deptest"
packages = ["."]
pruneopts = ""
revision = "ff2948a2ac8f538c4ecd55962e919d1e13e74baf"
version = "v1.0.0"
[solve-meta]
analyzer-name = "dep"
analyzer-version = 1
input-imports = ["github.com/sdboyer/deptest"]
solver-name = "gps-cdcl"
solver-version = 1

Просмотреть файл

Просмотреть файл

@ -0,0 +1,12 @@
// Copyright 2017 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package main
import (
_ "github.com/sdboyer/deptest"
)
func main() {
}

Просмотреть файл

@ -0,0 +1,3 @@
package deptest
type Foo int

Просмотреть файл

@ -0,0 +1,2 @@
# vendor is out of sync:
vendor/github.com/sdboyer/deptest: hash algorithm mismatch, want version 1

Просмотреть файл

@ -0,0 +1,9 @@
{
"commands": [
["check"]
],
"exit-code": 1,
"vendor-final": [
"github.com/sdboyer/deptest"
]
}

9
cmd/dep/testdata/harness_tests/check/missing_and_excess/final/Gopkg.lock сгенерированный поставляемый Normal file
Просмотреть файл

@ -0,0 +1,9 @@
# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'.
[solve-meta]
analyzer-name = "dep"
analyzer-version = 1
input-imports = ["github.com/sdboyer/deptest"]
solver-name = "gps-cdcl"
solver-version = 1

Просмотреть файл

9
cmd/dep/testdata/harness_tests/check/missing_and_excess/initial/Gopkg.lock сгенерированный поставляемый Normal file
Просмотреть файл

@ -0,0 +1,9 @@
# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'.
[solve-meta]
analyzer-name = "dep"
analyzer-version = 1
input-imports = ["github.com/sdboyer/deptest"]
solver-name = "gps-cdcl"
solver-version = 1

Просмотреть файл

Просмотреть файл

@ -0,0 +1,12 @@
// Copyright 2017 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package main
import (
_ "github.com/sdboyer/deptestdos"
)
func main() {
}

Просмотреть файл

@ -0,0 +1,4 @@
# Gopkg.lock is out of sync:
github.com/sdboyer/deptestdos: missing from input-imports
github.com/sdboyer/deptest: in input-imports, but not imported

Просмотреть файл

@ -0,0 +1,7 @@
{
"commands": [
["check"]
],
"exit-code": 1,
"vendor-final": []
}

9
cmd/dep/testdata/harness_tests/check/missing_inputs/final/Gopkg.lock сгенерированный поставляемый Normal file
Просмотреть файл

@ -0,0 +1,9 @@
# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'.
[solve-meta]
analyzer-name = "dep"
analyzer-version = 1
input-imports = []
solver-name = "gps-cdcl"
solver-version = 1

Просмотреть файл

9
cmd/dep/testdata/harness_tests/check/missing_inputs/initial/Gopkg.lock сгенерированный поставляемый Normal file
Просмотреть файл

@ -0,0 +1,9 @@
# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'.
[solve-meta]
analyzer-name = "dep"
analyzer-version = 1
input-imports = []
solver-name = "gps-cdcl"
solver-version = 1

Просмотреть файл

Просмотреть файл

@ -0,0 +1,12 @@
// Copyright 2017 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package main
import (
_ "github.com/sdboyer/deptestdos"
)
func main() {
}

Просмотреть файл

@ -0,0 +1,3 @@
# Gopkg.lock is out of sync:
github.com/sdboyer/deptestdos: missing from input-imports

Просмотреть файл

@ -0,0 +1,7 @@
{
"commands": [
["check"]
],
"exit-code": 1,
"vendor-final": []
}

17
cmd/dep/testdata/harness_tests/check/unmet_constraint/final/Gopkg.lock сгенерированный поставляемый Normal file
Просмотреть файл

@ -0,0 +1,17 @@
# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'.
[[projects]]
digest = "1:ddbbbe7f7a81c86d54e89fa388b532f4c144d666a14e8e483ba04fa58265b135"
name = "github.com/sdboyer/deptest"
packages = ["."]
pruneopts = ""
revision = "ff2948a2ac8f538c4ecd55962e919d1e13e74baf"
version = "v1.0.0"
[solve-meta]
analyzer-name = "dep"
analyzer-version = 1
input-imports = ["github.com/sdboyer/deptest"]
solver-name = "gps-cdcl"
solver-version = 1

Просмотреть файл

@ -0,0 +1,3 @@
[[constraint]]
name = "github.com/sdboyer/deptest"
branch = "master"

17
cmd/dep/testdata/harness_tests/check/unmet_constraint/initial/Gopkg.lock сгенерированный поставляемый Normal file
Просмотреть файл

@ -0,0 +1,17 @@
# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'.
[[projects]]
digest = "1:ddbbbe7f7a81c86d54e89fa388b532f4c144d666a14e8e483ba04fa58265b135"
name = "github.com/sdboyer/deptest"
packages = ["."]
pruneopts = ""
revision = "ff2948a2ac8f538c4ecd55962e919d1e13e74baf"
version = "v1.0.0"
[solve-meta]
analyzer-name = "dep"
analyzer-version = 1
input-imports = ["github.com/sdboyer/deptest"]
solver-name = "gps-cdcl"
solver-version = 1

Просмотреть файл

@ -0,0 +1,3 @@
[[constraint]]
name = "github.com/sdboyer/deptest"
branch = "master"

Просмотреть файл

@ -0,0 +1,12 @@
// Copyright 2017 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package main
import (
_ "github.com/sdboyer/deptest"
)
func main() {
}

Просмотреть файл

@ -0,0 +1,5 @@
# Gopkg.lock is out of sync:
github.com/sdboyer/deptest@v1.0.0: not allowed by constraint master
# vendor is out of sync:
vendor/github.com/sdboyer/deptest: missing from vendor

Просмотреть файл

@ -0,0 +1,7 @@
{
"commands": [
["check"]
],
"exit-code": 1,
"vendor-final": []
}

17
cmd/dep/testdata/harness_tests/check/unmet_override/final/Gopkg.lock сгенерированный поставляемый Normal file
Просмотреть файл

@ -0,0 +1,17 @@
# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'.
[[projects]]
digest = "1:ddbbbe7f7a81c86d54e89fa388b532f4c144d666a14e8e483ba04fa58265b135"
name = "github.com/sdboyer/deptest"
packages = ["."]
pruneopts = ""
revision = "ff2948a2ac8f538c4ecd55962e919d1e13e74baf"
version = "v1.0.0"
[solve-meta]
analyzer-name = "dep"
analyzer-version = 1
input-imports = ["github.com/sdboyer/deptest"]
solver-name = "gps-cdcl"
solver-version = 1

Просмотреть файл

@ -0,0 +1,3 @@
[[override]]
name = "github.com/sdboyer/deptest"
branch = "master"

17
cmd/dep/testdata/harness_tests/check/unmet_override/initial/Gopkg.lock сгенерированный поставляемый Normal file
Просмотреть файл

@ -0,0 +1,17 @@
# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'.
[[projects]]
digest = "1:ddbbbe7f7a81c86d54e89fa388b532f4c144d666a14e8e483ba04fa58265b135"
name = "github.com/sdboyer/deptest"
packages = ["."]
pruneopts = ""
revision = "ff2948a2ac8f538c4ecd55962e919d1e13e74baf"
version = "v1.0.0"
[solve-meta]
analyzer-name = "dep"
analyzer-version = 1
input-imports = ["github.com/sdboyer/deptest"]
solver-name = "gps-cdcl"
solver-version = 1

Просмотреть файл

@ -0,0 +1,3 @@
[[override]]
name = "github.com/sdboyer/deptest"
branch = "master"

Просмотреть файл

@ -0,0 +1,12 @@
// Copyright 2017 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package main
import (
_ "github.com/sdboyer/deptest"
)
func main() {
}

Просмотреть файл

@ -0,0 +1,5 @@
# Gopkg.lock is out of sync:
github.com/sdboyer/deptest@v1.0.0: not allowed by override master
# vendor is out of sync:
vendor/github.com/sdboyer/deptest: missing from vendor

Просмотреть файл

@ -0,0 +1,7 @@
{
"commands": [
["check"]
],
"exit-code": 1,
"vendor-final": []
}

17
cmd/dep/testdata/harness_tests/check/vendororphans/final/Gopkg.lock сгенерированный поставляемый Normal file
Просмотреть файл

@ -0,0 +1,17 @@
# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'.
[[projects]]
digest = "1:ddbbbe7f7a81c86d54e89fa388b532f4c144d666a14e8e483ba04fa58265b135"
name = "github.com/sdboyer/deptest"
packages = ["."]
pruneopts = ""
revision = "ff2948a2ac8f538c4ecd55962e919d1e13e74baf"
version = "v1.0.0"
[solve-meta]
analyzer-name = "dep"
analyzer-version = 1
input-imports = ["github.com/sdboyer/deptest"]
solver-name = "gps-cdcl"
solver-version = 1

Просмотреть файл

17
cmd/dep/testdata/harness_tests/check/vendororphans/initial/Gopkg.lock сгенерированный поставляемый Normal file
Просмотреть файл

@ -0,0 +1,17 @@
# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'.
[[projects]]
digest = "1:ddbbbe7f7a81c86d54e89fa388b532f4c144d666a14e8e483ba04fa58265b135"
name = "github.com/sdboyer/deptest"
packages = ["."]
pruneopts = ""
revision = "ff2948a2ac8f538c4ecd55962e919d1e13e74baf"
version = "v1.0.0"
[solve-meta]
analyzer-name = "dep"
analyzer-version = 1
input-imports = ["github.com/sdboyer/deptest"]
solver-name = "gps-cdcl"
solver-version = 1

Просмотреть файл

Просмотреть файл

@ -0,0 +1,12 @@
// Copyright 2017 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package main
import (
_ "github.com/sdboyer/deptest"
)
func main() {
}

Просмотреть файл

3
cmd/dep/testdata/harness_tests/check/vendororphans/initial/vendor/github.com/sdboyer/deptest/deptest.go сгенерированный поставляемый Normal file
Просмотреть файл

@ -0,0 +1,3 @@
package deptest
type Foo int

3
cmd/dep/testdata/harness_tests/check/vendororphans/stdout.txt поставляемый Normal file
Просмотреть файл

@ -0,0 +1,3 @@
# vendor is out of sync:
vendor/orphdir: unused project
vendor/foo: orphaned file

Просмотреть файл

@ -0,0 +1,9 @@
{
"commands": [
["check"]
],
"exit-code": 1,
"vendor-final": [
"github.com/sdboyer/deptest"
]
}