forked from redhat-best-practices-for-k8s/certsuite
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reapplied PR redhat-best-practices-for-k8s#1613 (redhat-best-practice…
…s-for-k8s#1647) The content of PR redhat-best-practices-for-k8s#1613 was accidentally removed from ginkgo_removal branch by commit 1c11b94. Co-authored-by: jmontesi <[email protected]>
- Loading branch information
1 parent
5955b7a
commit 2b51f30
Showing
31 changed files
with
2,930 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
// Copyright (C) 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 claim | ||
|
||
import ( | ||
"strings" | ||
) | ||
|
||
// TestCaseDescription describes a JUnit test case. | ||
type TestCaseDescription struct { | ||
// Identifier is the unique test identifier. | ||
Identifier Identifier `json:"identifier" yaml:"identifier"` | ||
|
||
// Description is a helpful description of the purpose of the test case. | ||
Description string `json:"description" yaml:"description"` | ||
|
||
// Remediation is an optional suggested remediation for passing the test. | ||
Remediation string `json:"remediation,omitempty" yaml:"remediation,omitempty"` | ||
|
||
// BestPracticeReference is a helpful best practice references of the test case. | ||
BestPracticeReference string `json:"BestPracticeReference" yaml:"BestPracticeReference"` | ||
|
||
// ExceptionProcess will show any possible exception processes documented for partners to follow. | ||
ExceptionProcess string `json:"exceptionProcess,omitempty" yaml:"exceptionProcess,omitempty"` | ||
|
||
// Tags will show all of the ginkgo tags that the test case applies to | ||
Tags string `json:"tags,omitempty" yaml:"tags,omitempty"` | ||
|
||
// Whether or not automated tests exist for the test case. Not to be rendered. | ||
Qe bool `json:"qe" yaml:"qe"` | ||
|
||
// classification for each test case | ||
CategoryClassification map[string]string `json:"categoryclassification" yaml:"categoryclassification"` | ||
/* an example to how it CategoryClassification would be | ||
{ | ||
"ForTelco": "Mandatory", | ||
"FarEdge" : "Optional", | ||
"ForNonTelco": "Optional", | ||
"ForVZ": "Mandatory" | ||
}*/ | ||
} | ||
|
||
func formTestTags(tags ...string) string { | ||
return strings.Join(tags, ",") | ||
} | ||
|
||
func BuildTestCaseDescription(testID, suiteName, description, remediation, exception, reference string, qe bool, categoryclassification map[string]string, tags ...string) (TestCaseDescription, Identifier) { | ||
aID := Identifier{ | ||
Tags: formTestTags(tags...), | ||
Id: suiteName + "-" + testID, | ||
Suite: suiteName, | ||
} | ||
aTCDescription := TestCaseDescription{} | ||
aTCDescription.Identifier = aID | ||
aTCDescription.Description = description | ||
aTCDescription.Remediation = remediation | ||
aTCDescription.ExceptionProcess = exception | ||
aTCDescription.BestPracticeReference = reference | ||
aTCDescription.Tags = strings.Join(tags, ",") | ||
aTCDescription.Qe = qe | ||
aTCDescription.CategoryClassification = categoryclassification | ||
return aTCDescription, aID | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// Copyright (C) 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 claim |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// Copyright (C) 2020 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 claim provides a test-network-definition claim schema. | ||
*/ | ||
package claim |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// Copyright (C) 2020 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 claim provides a test-network-definition claim schema. | ||
*/ | ||
package claim |
Oops, something went wrong.