github.com/kotalco/kotal@v0.3.0/clients/graph/graph_node_client_test.go (about)

     1  package graph
     2  
     3  import (
     4  	graphv1alpha1 "github.com/kotalco/kotal/apis/graph/v1alpha1"
     5  	. "github.com/onsi/ginkgo/v2"
     6  	. "github.com/onsi/gomega"
     7  	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
     8  )
     9  
    10  var _ = Describe("Graph node client", func() {
    11  
    12  	node := &graphv1alpha1.Node{
    13  		ObjectMeta: metav1.ObjectMeta{
    14  			Name:      "graph-node",
    15  			Namespace: "default",
    16  		},
    17  		Spec: graphv1alpha1.NodeSpec{},
    18  	}
    19  
    20  	// TODO: default node
    21  
    22  	client := NewClient(node)
    23  
    24  	It("Should get correct command", func() {
    25  		Expect(client.Command()).To(Equal(
    26  			[]string{
    27  				GraphNodeCommand,
    28  			},
    29  		))
    30  	})
    31  
    32  	It("Should get correct home directory", func() {
    33  		Expect(client.HomeDir()).To(Equal(GraphNodeHomeDir))
    34  	})
    35  
    36  	It("Should generate correct client arguments", func() {
    37  		Expect(client.Args()).To(ContainElements(
    38  			[]string{},
    39  		))
    40  	})
    41  
    42  })