client_test.go 465 B

12345678910111213141516171819202122232425262728
  1. package goSam
  2. import "testing"
  3. var client *Client
  4. func setup(t *testing.T) {
  5. var err error
  6. // these tests expect a running SAM brige on this address
  7. client, err = NewClientFromOptions(SetDebug(true))
  8. if err != nil {
  9. t.Fatalf("NewDefaultClient() Error: %q\n", err)
  10. }
  11. }
  12. func teardown(t *testing.T) {
  13. if err := client.Close(); err != nil {
  14. t.Fatalf("client.Close() Error: %q\n", err)
  15. }
  16. }
  17. func TestClientHello(t *testing.T) {
  18. setup(t)
  19. teardown(t)
  20. }