github.com/docker/compose-on-kubernetes@v0.5.0/cmd/api-server/main_test.go (about)

     1  package main
     2  
     3  import (
     4  	"os"
     5  	"testing"
     6  
     7  	log "github.com/sirupsen/logrus"
     8  	"github.com/spf13/cobra"
     9  )
    10  
    11  func TestImageServer(t *testing.T) {
    12  	if os.Getenv("TEST_API_SERVER") == "" {
    13  		t.Skip("skipping test: TEST_API_SERVER is not set")
    14  	}
    15  	err := start(func(cmd *cobra.Command) error {
    16  		cmd.SetArgs([]string{
    17  			"--kubeconfig", "",
    18  			"--authentication-kubeconfig", "",
    19  			"--authorization-kubeconfig", "",
    20  			"--secure-port", "9443",
    21  			"--etcd-servers", "http://127.0.0.1:2379",
    22  			"--service-namespace=e2e",
    23  			"--service-name=compose-api",
    24  		})
    25  		return nil
    26  	})
    27  	if err != nil {
    28  		log.Errorf("compose-controller fatal error: %s", err)
    29  		t.Fail()
    30  	}
    31  }