Skip to content

Commit

Permalink
Rename to 'certsuite-claim' (#125)
Browse files Browse the repository at this point in the history
  • Loading branch information
sebrandon1 authored Aug 7, 2024
1 parent 568c3ed commit 6bb1916
Show file tree
Hide file tree
Showing 11 changed files with 141 additions and 141 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# test-network-function-claim ![build](https://github.com/test-network-function/test-network-function-claim/actions/workflows/merge.yml/badge.svg) [![Go Report Card](https://goreportcard.com/badge/github.com/test-network-function/test-network-function-claim)](https://goreportcard.com/report/github.com/test-network-function/test-network-function-claim)
# certsuite-claim ![build](https://github.com/redhat-best-practices-for-k8s/certsuite-claim/actions/workflows/merge.yml/badge.svg) [![Go Report Card](https://goreportcard.com/badge/github.com/redhat-best-practices-for-k8s/certsuite-claim)](https://goreportcard.com/report/github.com/redhat-best-practices-for-k8s/certsuite-claim)

`test-network-function-claim` provides the definition for a
[test-network-function](https://github.com/test-network-function/test-network-function) claim.
`certsuite-claim` provides the definition for a
[redhat-best-practices-for-k8s](https://github.com/redhat-best-practices-for-k8s/redhat-best-practices-for-k8s) claim.

A claim contains:
* The `test-network-function` version used for testing. *Note*: The claim keeps track of only the
`test-network-function` version, and not individual test versions. For the current offering, the tests included in a
`test-network-function` release are immutable, and the source for all included tests is public. Any changes to provided
tests require a subsequent `test-network-function` release.
* The `redhat-best-practices-for-k8s` version used for testing. *Note*: The claim keeps track of only the
`redhat-best-practices-for-k8s` version, and not individual test versions. For the current offering, the tests included in a
`redhat-best-practices-for-k8s` release are immutable, and the source for all included tests is public. Any changes to provided
tests require a subsequent `redhat-best-practices-for-k8s` release.
* A start time for the claim evaluation.
* A description of the Hardware System(s) Under Test
* All test configurations used by tests.
Expand All @@ -16,7 +16,7 @@ tests require a subsequent `test-network-function` release.

`schemas/claim.schema.json` defines the claim schema using
[JSON Schema Draft-07](https://json-schema.org/draft-07/json-schema-release-notes.html). JSON Schema serves as the
only definition language for a `test-network-function` claim. In other words, even though other language bindings are
only definition language for a `redhat-best-practices-for-k8s` claim. In other words, even though other language bindings are
possible (and some provided), the ultimate claim definition is `claim.schema.json`. In the unfortunate event of
ambiguity between `claim.schema.json` and a particular language binding, the former rules.

Expand Down
4 changes: 2 additions & 2 deletions cmd/generate/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"time"

"github.com/a-h/generate"
igenerate "github.com/test-network-function/test-network-function-claim/internal/generate"
igenerate "github.com/redhat-best-practices-for-k8s/certsuite-claim/internal/generate"
)

const (
Expand Down Expand Up @@ -57,7 +57,7 @@ func prependCustomCodeGenerationMessage(w io.Writer) error {
"",
"",
"//",
"// Code generated by `test-network-function-claim/cmd/generate/generate.go` on: " + currentTime.String(),
"// Code generated by `certsuite-claim/cmd/generate/generate.go` on: " + currentTime.String(),
"//",
"// `https://github.com/a-h/generate` provides a generic set of interfaces to convert JSON schema into",
"// workable GoLang struct implementations. However, the code generator is limited and does not allow",
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/test-network-function/test-network-function-claim
module github.com/redhat-best-practices-for-k8s/certsuite-claim

go 1.22.5

Expand Down
2 changes: 1 addition & 1 deletion internal/generate/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
// Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

/*
Package generate is responsible for generating GoLang representations of the test-network-function claim defined by
Package generate is responsible for generating GoLang representations of the redhat-best-practices-for-k8s claim defined by
`claim-schema.json`. A modified version of `https://github.com/a-h/generate` is utilized to emit GoLang structs
and their corresponding `MarshallJSON` and `UnmarshallJSON` interface implementations. A modified version was
utilized since the original version (`https://github.com/a-h/generate`) blindly remaps JSON "object" types to GoLang
Expand Down
14 changes: 7 additions & 7 deletions pkg/claim/schema.go

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

4 changes: 2 additions & 2 deletions pkg/claim/schema_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ func TestResult_UnmarshalJSON(t *testing.T) { //nolint:funlen
//nolint:lll
CapturedTestOutput: "{\"CompliantObjectsOut\":[{\"ObjectType\":\"Container\",\"ObjectFieldsKeys\":[\"Reason For Compliance\",\"Namespace\",\"Pod Name\",\"Container Name\"],\"ObjectFieldsValues\":[\"Container is not modified\",\"tnf\",\"test-0\",\"test\"]},{\"ObjectType\":\"Container\",\"ObjectFieldsKeys\":[\"Reason For Compliance\",\"Namespace\",\"Pod Name\",\"Container Name\"],\"ObjectFieldsValues\":[\"Container is not modified\",\"tnf\",\"test-1\",\"test\"]},{\"ObjectType\":\"Container\",\"ObjectFieldsKeys\":[\"Reason For Compliance\",\"Namespace\",\"Pod Name\",\"Container Name\"],\"ObjectFieldsValues\":[\"Container is not modified\",\"tnf\",\"test-d78fbf8d6-jxgl2\",\"test\"]},{\"ObjectType\":\"Container\",\"ObjectFieldsKeys\":[\"Reason For Compliance\",\"Namespace\",\"Pod Name\",\"Container Name\"],\"ObjectFieldsValues\":[\"Container is not modified\",\"tnf\",\"test-d78fbf8d6-n4jlv\",\"test\"]}],\"NonCompliantObjectsOut\":null}\n",
CatalogInfo: &CatalogInfo{
BestPracticeReference: "https://test-network-function.github.io/cnf-best-practices/#cnf-best-practices-image-standards",
BestPracticeReference: "https://redhat-best-practices-for-k8s.github.io/cnf-best-practices/#cnf-best-practices-image-standards",
//nolint:lll
Description: "Ensures that the Container Base Image is not altered post-startup. This test is a heuristic, and ensures that there are no changes to the following directories: 1) /var/lib/rpm 2) /var/lib/dpkg 3) /bin 4) /sbin 5) /lib 6) /lib64 7) /usr/bin 8) /usr/sbin 9) /usr/lib 10) /usr/lib64",
ExceptionProcess: "No exceptions",
Expand Down Expand Up @@ -182,7 +182,7 @@ func TestResult_UnmarshalJSON(t *testing.T) { //nolint:funlen
{
"capturedTestOutput": "{\"CompliantObjectsOut\":[{\"ObjectType\":\"Container\",\"ObjectFieldsKeys\":[\"Reason For Compliance\",\"Namespace\",\"Pod Name\",\"Container Name\"],\"ObjectFieldsValues\":[\"Container is not modified\",\"tnf\",\"test-0\",\"test\"]},{\"ObjectType\":\"Container\",\"ObjectFieldsKeys\":[\"Reason For Compliance\",\"Namespace\",\"Pod Name\",\"Container Name\"],\"ObjectFieldsValues\":[\"Container is not modified\",\"tnf\",\"test-1\",\"test\"]},{\"ObjectType\":\"Container\",\"ObjectFieldsKeys\":[\"Reason For Compliance\",\"Namespace\",\"Pod Name\",\"Container Name\"],\"ObjectFieldsValues\":[\"Container is not modified\",\"tnf\",\"test-d78fbf8d6-jxgl2\",\"test\"]},{\"ObjectType\":\"Container\",\"ObjectFieldsKeys\":[\"Reason For Compliance\",\"Namespace\",\"Pod Name\",\"Container Name\"],\"ObjectFieldsValues\":[\"Container is not modified\",\"tnf\",\"test-d78fbf8d6-n4jlv\",\"test\"]}],\"NonCompliantObjectsOut\":null}\n",
"catalogInfo": {
"bestPracticeReference": "https://test-network-function.github.io/cnf-best-practices/#cnf-best-practices-image-standards",
"bestPracticeReference": "https://redhat-best-practices-for-k8s.github.io/cnf-best-practices/#cnf-best-practices-image-standards",
"description": "Ensures that the Container Base Image is not altered post-startup. This test is a heuristic, and ensures that there are no changes to the following directories: 1) /var/lib/rpm 2) /var/lib/dpkg 3) /bin 4) /sbin 5) /lib 6) /lib64 7) /usr/bin 8) /usr/sbin 9) /usr/lib 10) /usr/lib64",
"exceptionProcess": "No exceptions",
"remediation": "Ensure that Container applications do not modify the Container Base Image. In particular, ensure that the following directories are not modified: 1) /var/lib/rpm 2) /var/lib/dpkg 3) /bin 4) /sbin 5) /lib 6) /lib64 7) /usr/bin 8) /usr/sbin 9) /usr/lib 10) /usr/lib64 Ensure that all required binaries are built directly into the container image, and are not installed post startup."
Expand Down
2 changes: 1 addition & 1 deletion pkg/claim/testdata/claim-invalid-additional-property.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
},
"configurations": {},
"results": {
"{\"url\":\"https://test-network-function.com/tnf/test\",{\"version\":\"v1.0.0\"}": [
"{\"url\":\"https://redhat-best-practices-for-k8s.com/tnf/test\",{\"version\":\"v1.0.0\"}": [
{
"testText": "someText",
"isMeasurement": false,
Expand Down
2 changes: 1 addition & 1 deletion pkg/claim/testdata/claim-invalid-bool-results.json
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@
},
"results": {
"identifier": {
"url": "https://test-network-function.com/tnf/test",
"url": "https://redhat-best-practices-for-k8s.com/tnf/test",
"version": "v1.0.0"
},
"results": [
Expand Down
Loading

0 comments on commit 6bb1916

Please sign in to comment.