From b1430531ffe6ad29459c3ef2d71f41721553bc5f Mon Sep 17 00:00:00 2001 From: Sunny Date: Sat, 23 Sep 2017 22:39:52 +0530 Subject: [PATCH] test(status): tests for missing pkgs lock mismatch --- .../status/ignore_lock_mismatch/testcase.json | 2 +- .../status/missing_pkgs_lock_mismatch/final/Gopkg.lock | 9 +++++++++ .../status/missing_pkgs_lock_mismatch/final/Gopkg.toml | 0 .../status/missing_pkgs_lock_mismatch/initial/Gopkg.lock | 9 +++++++++ .../status/missing_pkgs_lock_mismatch/initial/Gopkg.toml | 0 .../status/missing_pkgs_lock_mismatch/initial/main.go | 8 ++++++++ .../status/missing_pkgs_lock_mismatch/testcase.json | 7 +++++++ 7 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 cmd/dep/testdata/harness_tests/status/missing_pkgs_lock_mismatch/final/Gopkg.lock create mode 100644 cmd/dep/testdata/harness_tests/status/missing_pkgs_lock_mismatch/final/Gopkg.toml create mode 100644 cmd/dep/testdata/harness_tests/status/missing_pkgs_lock_mismatch/initial/Gopkg.lock create mode 100644 cmd/dep/testdata/harness_tests/status/missing_pkgs_lock_mismatch/initial/Gopkg.toml create mode 100644 cmd/dep/testdata/harness_tests/status/missing_pkgs_lock_mismatch/initial/main.go create mode 100644 cmd/dep/testdata/harness_tests/status/missing_pkgs_lock_mismatch/testcase.json diff --git a/cmd/dep/testdata/harness_tests/status/ignore_lock_mismatch/testcase.json b/cmd/dep/testdata/harness_tests/status/ignore_lock_mismatch/testcase.json index cadfde4eb1..dc1776d5f2 100644 --- a/cmd/dep/testdata/harness_tests/status/ignore_lock_mismatch/testcase.json +++ b/cmd/dep/testdata/harness_tests/status/ignore_lock_mismatch/testcase.json @@ -2,6 +2,6 @@ "commands": [ ["status"] ], - "error-expected": "inputs-digest mismatch", + "error-expected": "This happens when Gopkg.toml is modified", "vendor-final": [] } diff --git a/cmd/dep/testdata/harness_tests/status/missing_pkgs_lock_mismatch/final/Gopkg.lock b/cmd/dep/testdata/harness_tests/status/missing_pkgs_lock_mismatch/final/Gopkg.lock new file mode 100644 index 0000000000..bef2d0092e --- /dev/null +++ b/cmd/dep/testdata/harness_tests/status/missing_pkgs_lock_mismatch/final/Gopkg.lock @@ -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 + inputs-digest = "ab4fef131ee828e96ba67d31a7d690bd5f2f42040c6766b1b12fe856f87e0ff7" + solver-name = "gps-cdcl" + solver-version = 1 diff --git a/cmd/dep/testdata/harness_tests/status/missing_pkgs_lock_mismatch/final/Gopkg.toml b/cmd/dep/testdata/harness_tests/status/missing_pkgs_lock_mismatch/final/Gopkg.toml new file mode 100644 index 0000000000..e69de29bb2 diff --git a/cmd/dep/testdata/harness_tests/status/missing_pkgs_lock_mismatch/initial/Gopkg.lock b/cmd/dep/testdata/harness_tests/status/missing_pkgs_lock_mismatch/initial/Gopkg.lock new file mode 100644 index 0000000000..bef2d0092e --- /dev/null +++ b/cmd/dep/testdata/harness_tests/status/missing_pkgs_lock_mismatch/initial/Gopkg.lock @@ -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 + inputs-digest = "ab4fef131ee828e96ba67d31a7d690bd5f2f42040c6766b1b12fe856f87e0ff7" + solver-name = "gps-cdcl" + solver-version = 1 diff --git a/cmd/dep/testdata/harness_tests/status/missing_pkgs_lock_mismatch/initial/Gopkg.toml b/cmd/dep/testdata/harness_tests/status/missing_pkgs_lock_mismatch/initial/Gopkg.toml new file mode 100644 index 0000000000..e69de29bb2 diff --git a/cmd/dep/testdata/harness_tests/status/missing_pkgs_lock_mismatch/initial/main.go b/cmd/dep/testdata/harness_tests/status/missing_pkgs_lock_mismatch/initial/main.go new file mode 100644 index 0000000000..935f86c58f --- /dev/null +++ b/cmd/dep/testdata/harness_tests/status/missing_pkgs_lock_mismatch/initial/main.go @@ -0,0 +1,8 @@ +package main + +import ( + _ "github.com/sdboyer/deptestdos" +) + +func main() { +} diff --git a/cmd/dep/testdata/harness_tests/status/missing_pkgs_lock_mismatch/testcase.json b/cmd/dep/testdata/harness_tests/status/missing_pkgs_lock_mismatch/testcase.json new file mode 100644 index 0000000000..a1f7531975 --- /dev/null +++ b/cmd/dep/testdata/harness_tests/status/missing_pkgs_lock_mismatch/testcase.json @@ -0,0 +1,7 @@ +{ + "commands": [ + ["status"] + ], + "error-expected": "due to the following packages missing from the lock", + "vendor-final": [] +}