Debian Codegraph @

dynect/convenient_client_test.go

raw symbols ◀ ▶ SCIP
1 Debian patch touch this file
1 package dynect
2
3 import (
4 "testing"
5
6 "github.com/dnaeon/go-vcr/recorder"
7 )
8
9 // test helper to setup convenient client with vcr cassette
10 func withConvenientClient(cassetteName string, f func(*ConvenientClient)) {
11 withCassette(cassetteName, func(r *recorder.Recorder) {
12 c := NewConvenientClient(DynCustomerName)
13 c.SetTransport(r)
14 c.Verbose(true)
15
16 f(c)
17 })
18 }
19
20 // test helper to setup authenticated convenient client with vcr cassette
21 func testWithConvenientClientSession(cassetteName string, t *testing.T, f func(*ConvenientClient)) {
22 withConvenientClient(cassetteName, func(c *ConvenientClient) {
23 if err := c.Login(DynUsername, DynPassword); err != nil {
24 t.Error(err)
25 }
26
27 defer func() {
28 if err := c.Logout(); err != nil {
29 t.Error(err)
30 }
31 }()
32
33 f(c)
34 })
35 }
36
37 func TestConvenientLoginLogout(t *testing.T) {
38 }
39
40 func TestConvenientGetA(t *testing.T) {
41 }
42
43 func TestConvenientGetANotFound(t *testing.T) {
44 }
45
46 func TestConvenientGetCNAME(t *testing.T) {
47 }
48
49 func TestConvenientCreateMX(t *testing.T) {
50 }
51
52 func TestConvenientCreateZone(t *testing.T) {
53 }
54
55 func TestConvenientDeleteZone(t *testing.T) {
56 }
57
58 func TestConvenientDeleteSubZone(t *testing.T) {
59 }