diff --git a/README.md b/README.md index dd7e073b..378c8345 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ version Print version. ``` -## Install [![Build Status](https://api.travis-ci.org/minio/mc.svg?branch=master)](https://travis-ci.org/minio/mc) +## Install [![Build Status](https://api.travis-ci.org/minio/mc.svg?branch=master)](https://travis-ci.org/minio/mc) [![Build status](https://ci.appveyor.com/api/projects/status/3ng8bef7b3e1v763?svg=true)](https://ci.appveyor.com/project/harshavardhana/mc) #### GNU/Linux diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 00000000..725ca7c9 --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,45 @@ +# version format +version: "{build}" + +# Operating system (build VM template) +os: Windows Server 2012 R2 + +clone_folder: c:\gopath\src\github.com\minio\mc + +# environment variables +environment: + GOPATH: c:\gopath + GO15VENDOREXPERIMENT: 1 + +# scripts that run after cloning repository +install: + - set PATH=%GOPATH%\bin;c:\go\bin;%PATH% + - set GOVENDOR15EXPERIMENT=1 + - rmdir c:\go /s /q + - appveyor DownloadFile https://storage.googleapis.com/golang/go1.5.1.windows-amd64.msi + - msiexec /i go1.5.1.windows-amd64.msi /q + - go version + - go env + - go get -u github.com/golang/lint/golint + - go get -u golang.org/x/tools/cmd/vet + - go get -u github.com/fzipp/gocyclo + - go get -u github.com/remyoudompheng/go-misc/deadcode + +# to run your custom scripts instead of automatic MSBuild +build_script: + - set GOVENDOR15EXPERIMENT=1 + - go tool vet -all ./pkg + - go tool vet -shadow=true ./pkg + - gofmt -s -l pkg + - golint . + - golint github.com/minio/mc/pkg... + - gocyclo -over 30 . + - deadcode + - go test + - go test -race + +# to disable automatic tests +test: off + +# to disable deployment +deploy: off diff --git a/session_test.go b/session_test.go index aa532a1a..9aa92b9c 100644 --- a/session_test.go +++ b/session_test.go @@ -97,6 +97,8 @@ func (s *TestSuite) TestSessionContext(c *C) { perr = session.Save() c.Assert(perr, IsNil) + c.Assert(session.Close(), IsNil) + err = app.Run([]string{os.Args[0], "session", "clear", session.SessionID}) c.Assert(err, IsNil) c.Assert(console.IsExited, Equals, false)