Merge pull request #72168 from brahmaroutu/conformance_hdr

Allow version field in the title to be changeable
This commit is contained in:
Kubernetes Prow Robot 2019-07-01 19:09:08 -07:00 committed by GitHub
commit f7f1b2d5f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 5 deletions

View File

@ -1,4 +1,4 @@
# Kubernetes Conformance Test Suite - v1.9
# Kubernetes Conformance Test Suite - {{.Version}}
## **Summary**
This document provides a summary of the tests included in the Kubernetes conformance test suite.
@ -16,6 +16,7 @@ Example:
```
/*
Testname: Kubelet-OutputToLogs
Release: v1.9
Description: By default the stdout and stderr from the process
being executed in a pod MUST be sent to the pod's logs.
*/
@ -30,6 +31,7 @@ documentation for that test.
### **Output:**
## [Kubelet-OutputToLogs](https://github.com/kubernetes/kubernetes/blob/release-1.9/test/e2e_node/kubelet_test.go#L42)
### Release v1.9
By default the stdout and stderr from the process
being executed in a pod MUST be sent to the pod's logs.
Note this test needs to be fixed to also test for stderr

View File

@ -29,17 +29,18 @@ import (
"go/ast"
"go/parser"
"go/token"
"io/ioutil"
"os"
"path/filepath"
"regexp"
"strconv"
"strings"
"text/template"
)
var (
baseURL = flag.String("url", "https://github.com/kubernetes/kubernetes/tree/master/", "location of the current source")
confDoc = flag.Bool("conformance", false, "write a conformance document")
version = flag.String("version", "v1.9", "version of this conformance document")
totalConfTests, totalLegacyTests, missingComments int
// If a test name contains any of these tags, it is ineligble for promotion to conformance
@ -385,10 +386,16 @@ func main() {
if *confDoc {
// Note: this assumes that you're running from the root of the kube src repo
header, err := ioutil.ReadFile("test/conformance/cf_header.md")
if err == nil {
fmt.Printf("%s\n\n", header)
templ, err := template.ParseFiles("test/conformance/cf_header.md")
if err != nil {
fmt.Printf("Error reading the Header file information: %s\n\n", err)
}
data := struct {
Version string
}{
Version: *version,
}
templ.Execute(os.Stdout, data)
}
totalConfTests = 0