github.com/fanux/shipyard@v0.0.0-20161009071005-6515ce223235/controller/api/api_test.go (about)

     1  package api
     2  
     3  import (
     4  	log "github.com/Sirupsen/logrus"
     5  	"github.com/shipyard/shipyard/controller/mock_test"
     6  )
     7  
     8  func getTestApi() (*Api, error) {
     9  	log.SetLevel(log.ErrorLevel)
    10  	m := mock_test.MockManager{}
    11  	config := ApiConfig{
    12  		ListenAddr:         "",
    13  		Manager:            m,
    14  		AuthWhiteListCIDRs: nil,
    15  		EnableCORS:         false,
    16  		AllowInsecure:      true,
    17  		TLSCertPath:        "",
    18  		TLSKeyPath:         "",
    19  	}
    20  
    21  	return NewApi(config)
    22  }