+
+
+
+
+
+
+
+
+
diff --git a/internal/version/version_test.go b/internal/version/version_test.go
new file mode 100644
index 000000000..549e72476
--- /dev/null
+++ b/internal/version/version_test.go
@@ -0,0 +1,17 @@
+// Copyright (C) 2020-2023 Red Hat, Inc.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this program; if not, write to the Free Software Foundation, Inc.,
+// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+package version
diff --git a/pkg/claim/schema.go b/pkg/claim/schema.go
index 588f72da8..9781769d6 100644
--- a/pkg/claim/schema.go
+++ b/pkg/claim/schema.go
@@ -1077,7 +1077,6 @@ func (strct *Versions) MarshalJSON() ([]byte, error) {
}
func (strct *Versions) UnmarshalJSON(b []byte) error {
- claimFormatReceived := false
tnfReceived := false
var jsonMap map[string]json.RawMessage
if err := json.Unmarshal(b, &jsonMap); err != nil {
@@ -1111,10 +1110,6 @@ func (strct *Versions) UnmarshalJSON(b []byte) error {
return fmt.Errorf("additional property not allowed: \"" + k + "\"")
}
}
- // check if claimFormat (a required property) was received
- if !claimFormatReceived {
- return errors.New("\"claimFormat\" is required but was not present")
- }
// check if tnf (a required property) was received
if !tnfReceived {
return errors.New("\"tnf\" is required but was not present")
diff --git a/pkg/claim/testdata/claim-invalid-additional-property.json b/pkg/claim/testdata/claim-invalid-additional-property.json
index 0f52ee9c7..898f3c5f4 100644
--- a/pkg/claim/testdata/claim-invalid-additional-property.json
+++ b/pkg/claim/testdata/claim-invalid-additional-property.json
@@ -6,8 +6,7 @@
"endTime": "1970-01-01T10:05:08+01:00"
},
"versions": {
- "tnf": "v0.0.1",
- "claimFormat":"v0.0.1"
+ "tnf": "v0.0.1"
},
"configurations": {},
"rawResults": {
diff --git a/pkg/claim/testdata/claim-invalid-bool-results.json b/pkg/claim/testdata/claim-invalid-bool-results.json
index ac26f4d6a..94bb6f828 100644
--- a/pkg/claim/testdata/claim-invalid-bool-results.json
+++ b/pkg/claim/testdata/claim-invalid-bool-results.json
@@ -212,8 +212,7 @@
}
},
"versions": {
- "tnf": "v0.0.3",
- "claimFormat":"v0.0.1"
+ "tnf": "v0.0.3"
},
"results": false
}
diff --git a/pkg/claim/testdata/claim-invalid-junit-payload.json b/pkg/claim/testdata/claim-invalid-junit-payload.json
index 60a201aa3..66a899980 100644
--- a/pkg/claim/testdata/claim-invalid-junit-payload.json
+++ b/pkg/claim/testdata/claim-invalid-junit-payload.json
@@ -5,8 +5,7 @@
"endTime": "1970-01-01T10:05:08+01:00"
},
"versions": {
- "tnf": "v0.0.1",
- "claimFormat":"v0.0.1"
+ "tnf": "v0.0.1"
},
"configurations": {},
"rawResults": false,
diff --git a/pkg/claim/testdata/claim-invalid-non-result-result.json b/pkg/claim/testdata/claim-invalid-non-result-result.json
index 6008bcf71..d0702838b 100644
--- a/pkg/claim/testdata/claim-invalid-non-result-result.json
+++ b/pkg/claim/testdata/claim-invalid-non-result-result.json
@@ -212,8 +212,7 @@
}
},
"versions": {
- "tnf": "v0.0.3",
- "claimFormat":"v0.0.1"
+ "tnf": "v0.0.3"
},
"results": {
"{\"url\":\"https://test-network-function.com/tnf/test\",{\"version\":\"v1.0.0\"}": [
diff --git a/pkg/claim/testdata/claim-valid.json b/pkg/claim/testdata/claim-valid.json
index c3144642c..31395e803 100644
--- a/pkg/claim/testdata/claim-valid.json
+++ b/pkg/claim/testdata/claim-valid.json
@@ -212,8 +212,7 @@
}
},
"versions": {
- "tnf": "v0.0.3",
- "claimFormat":"v0.0.1"
+ "tnf": "v0.0.3"
},
"results": {
"{\"url\":\"https://test-network-function.com/tnf/test\",{\"version\":\"v1.0.0\"}": [