Replace minikube for e2e tests

This commit is contained in:
Manuel de Brito Fontes 2018-07-27 20:39:01 -04:00 committed by Manuel Alejandro de Brito Fontes
parent c0a30eac7f
commit 7032fb7d68
No known key found for this signature in database
GPG key ID: 786136016A8BA02A
9 changed files with 1837 additions and 118 deletions

View file

@ -50,6 +50,7 @@ args = parser.parse_args()
verbose_out = sys.stderr if args.verbose else open("/dev/null", "w")
def get_refs():
refs = {}
@ -63,6 +64,7 @@ def get_refs():
return refs
def file_passes(filename, refs, regexs):
try:
f = open(filename, 'r')
@ -127,10 +129,19 @@ def file_passes(filename, refs, regexs):
return True
def file_extension(filename):
return os.path.splitext(filename)[1].split(".")[-1].lower()
skipped_dirs = ['.git', "vendor", "test/e2e/framework/framework.go", "test/e2e/generated/bindata.go", "hack/boilerplate/test", "internal/file/bindata.go"]
skipped_dirs = [
'.git',
"vendor",
"test/e2e/framework/framework.go",
"hack/boilerplate/test",
"test/e2e/dind-cluster-v1.11.sh"
]
def normalize_files(files):
newfiles = []
@ -143,6 +154,7 @@ def normalize_files(files):
newfiles[i] = os.path.join(args.rootdir, pathname)
return newfiles
def get_files(extensions):
files = []
if len(args.filenames) > 0:
@ -170,19 +182,23 @@ def get_files(extensions):
outfiles.append(pathname)
return outfiles
def get_regexs():
regexs = {}
# Search for "YEAR" which exists in the boilerplate, but shouldn't in the real thing
regexs["year"] = re.compile( 'YEAR' )
regexs["year"] = re.compile('YEAR')
# dates can be 2014, 2015, 2016, ..., CURRENT_YEAR, company holder names can be anything
years = range(2014, date.today().year + 1)
regexs["date"] = re.compile( '(%s)' % "|".join(map(lambda l: str(l), years)) )
regexs["date"] = re.compile(
'(%s)' % "|".join(map(lambda l: str(l), years)))
# strip // +build \n\n build constraints
regexs["go_build_constraints"] = re.compile(r"^(// \+build.*\n)+\n", re.MULTILINE)
regexs["go_build_constraints"] = re.compile(
r"^(// \+build.*\n)+\n", re.MULTILINE)
# strip #!.* from shell scripts
regexs["shebang"] = re.compile(r"^(#!.*\n)\n*", re.MULTILINE)
return regexs
def main():
regexs = get_regexs()
refs = get_refs()
@ -194,5 +210,6 @@ def main():
return 0
if __name__ == "__main__":
sys.exit(main())
sys.exit(main())