Skip to content

Commit

Permalink
Add e2e tests for major cloud providers (#84)
Browse files Browse the repository at this point in the history
  • Loading branch information
tamalsaha authored Jun 27, 2017
1 parent 75c10a5 commit 272cd16
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,4 @@ _testmain.go
.idea/
dist/
**/junit.xml
**/.env
12 changes: 7 additions & 5 deletions hack/make.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ def check_antipackage():

# ref: https://github.com/ellisonbg/antipackage
import antipackage
from github.appscode.libbuild import libbuild
from github.appscode.libbuild import libbuild, pydotenv

import os
import os.path
import subprocess
import sys
from os.path import expandvars
from os.path import expandvars, join, dirname

libbuild.REPO_ROOT = expandvars('$GOPATH') + '/src/github.com/appscode/stash'
BUILD_METADATA = libbuild.metadata(libbuild.REPO_ROOT)
Expand Down Expand Up @@ -156,19 +156,21 @@ def default():
fmt()
die(call('GO15VENDOREXPERIMENT=1 ' + libbuild.GOC + ' install . ./test/...'))

def test(type):
def test(type, *args):
pydotenv.load_dotenv(join(libbuild.REPO_ROOT, 'test/e2e/config/.env'))
if type == 'unit':
unit_test()
elif type == 'e2e':
e2e_test()

else:
print '{test unit|minikube|e2e}'

def unit_test():
die(call(libbuild.GOC + ' test -v ./pkg/...'))


def e2e_test():
die(call(libbuild.GOC + ' test -v ./test/e2e/... -timeout 10h'))
die(call('ginkgo -r --progress --trace -- --v=3'))


if __name__ == "__main__":
Expand Down

0 comments on commit 272cd16

Please sign in to comment.