Skip to content

Commit 00f6e86

Browse files
author
Zhou Hao
committed
Modify the corresponding test according to hashicorp/go-multierror v1.0.0.
Signed-off-by: Zhou Hao <[email protected]>
1 parent b005481 commit 00f6e86

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

validate/validate_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ func TestJSONSchema(t *testing.T) {
4343
}{
4444
{
4545
config: &rspec.Spec{},
46-
error: "1 error occurred:\n\n* Version string empty\nRefer to: https://github.com/opencontainers/runtime-spec/blob/v1.0.1/config.md#specification-version",
46+
error: "1 error occurred:\n\t* Version string empty\nRefer to: https://github.com/opencontainers/runtime-spec/blob/v1.0.1/config.md#specification-version\n\n",
4747
},
4848
{
4949
config: &rspec.Spec{
@@ -128,7 +128,7 @@ func TestJSONSchema(t *testing.T) {
128128
},
129129
},
130130
},
131-
error: "2 errors occurred:\n\n* linux.namespaces.0: Must validate at least one schema (anyOf)\n* linux.namespaces.0.type: linux.namespaces.0.type must be one of the following: \"mount\", \"pid\", \"network\", \"uts\", \"ipc\", \"user\", \"cgroup\"",
131+
error: "2 errors occurred:\n\t* linux.namespaces.0: Must validate at least one schema (anyOf)\n\t* linux.namespaces.0.type: linux.namespaces.0.type must be one of the following: \"mount\", \"pid\", \"network\", \"uts\", \"ipc\", \"user\", \"cgroup\"\n\n",
132132
},
133133
{
134134
config: &rspec.Spec{
@@ -716,11 +716,11 @@ func TestCheckMandatoryFields(t *testing.T) {
716716
}{
717717
{
718718
config: &rspec.Spec{},
719-
error: "1 error occurred:\n\n* 'Spec.Version' should not be empty",
719+
error: "1 error occurred:\n\t* 'Spec.Version' should not be empty\n\n",
720720
},
721721
{
722722
config: nil,
723-
error: "1 error occurred:\n\n* Spec can't be nil",
723+
error: "1 error occurred:\n\t* Spec can't be nil\n\n",
724724
},
725725
{
726726
config: &rspec.Spec{
@@ -733,7 +733,7 @@ func TestCheckMandatoryFields(t *testing.T) {
733733
Version: "1.0.0",
734734
Root: &rspec.Root{},
735735
},
736-
error: "1 error occurred:\n\n* 'Root.Path' should not be empty",
736+
error: "1 error occurred:\n\t* 'Root.Path' should not be empty\n\n",
737737
},
738738
} {
739739
t.Run(tt.error, func(t *testing.T) {

0 commit comments

Comments
 (0)