Skip to content

Commit

Permalink
claim file: move data structs and handlers to the CNF repo (#1607)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmontesi authored Nov 13, 2023
1 parent 78628ae commit 933e1bc
Show file tree
Hide file tree
Showing 13 changed files with 253 additions and 21 deletions.
2 changes: 1 addition & 1 deletion cmd/tnf/claim/add/add_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ func TestReadClaim(t *testing.T) {
expectedClaimRoot *claim.Root
}{
{ // Test Case #1 - Happy path
testContents: `{"claim":{"versions":{"k8s":"1.23.1","tnf":"0.3.1", "claimFormat":"v0.0.1"},"configurations":{},"metadata":{"endTime":"1:33:00","startTime":"2:33:00"},"nodes":{},"results":{},"rawResults":{}}}`,
testContents: `{"claim":{"versions":{"k8s":"1.23.1","tnf":"0.3.1"},"configurations":{},"metadata":{"endTime":"1:33:00","startTime":"2:33:00"},"nodes":{},"results":{},"rawResults":{}}}`,
expectedClaimRoot: &claim.Root{
Claim: &claim.Claim{
Versions: &claim.Versions{
Expand Down
1 change: 0 additions & 1 deletion cmd/tnf/claim/compare/testdata/claim_access_control.json
Original file line number Diff line number Diff line change
Expand Up @@ -11851,7 +11851,6 @@
]
},
"versions": {
"claimFormat": "v0.1.0",
"k8s": "v1.26.3+b404935",
"ocClient": "n/a, (not using oc or kubectl client)",
"ocp": "4.13.0",
Expand Down
1 change: 0 additions & 1 deletion cmd/tnf/claim/compare/testdata/claim_observability.json
Original file line number Diff line number Diff line change
Expand Up @@ -11877,7 +11877,6 @@
]
},
"versions": {
"claimFormat": "v0.1.0",
"k8s": "v1.26.4+c343423",
"ocClient": "n/a, (not using oc or kubectl client)",
"ocp": "4.13.1",
Expand Down
1 change: 0 additions & 1 deletion cmd/tnf/claim/show/failures/testdata/claim1.json
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@
]
},
"versions": {
"claimFormat": "v0.0.1",
"k8s": "v1.27.3",
"ocClient": "n/a, (not using oc or kubectl client)",
"ocp": "n/a, (non-OpenShift cluster)",
Expand Down
1 change: 0 additions & 1 deletion cmd/tnf/claim/show/failures/testdata/claim2.json
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@
]
},
"versions": {
"claimFormat": "v0.0.1",
"k8s": "v1.27.3",
"ocClient": "n/a, (not using oc or kubectl client)",
"ocp": "n/a, (non-OpenShift cluster)",
Expand Down
231 changes: 230 additions & 1 deletion cnf-certification-test/results/html/results.html

Large diffs are not rendered by default.

17 changes: 17 additions & 0 deletions internal/version/version_test.go
Original file line number Diff line number Diff line change
@@ -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
5 changes: 0 additions & 5 deletions pkg/claim/schema.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions pkg/claim/testdata/claim-invalid-additional-property.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
3 changes: 1 addition & 2 deletions pkg/claim/testdata/claim-invalid-bool-results.json
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,7 @@
}
},
"versions": {
"tnf": "v0.0.3",
"claimFormat":"v0.0.1"
"tnf": "v0.0.3"
},
"results": false
}
Expand Down
3 changes: 1 addition & 2 deletions pkg/claim/testdata/claim-invalid-junit-payload.json
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
3 changes: 1 addition & 2 deletions pkg/claim/testdata/claim-invalid-non-result-result.json
Original file line number Diff line number Diff line change
Expand Up @@ -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\"}": [
Expand Down
3 changes: 1 addition & 2 deletions pkg/claim/testdata/claim-valid.json
Original file line number Diff line number Diff line change
Expand Up @@ -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\"}": [
Expand Down

0 comments on commit 933e1bc

Please sign in to comment.