Skip to content
This repository was archived by the owner on Jun 18, 2022. It is now read-only.

Commit 87f81d3

Browse files
committed
Add a test for testing public API
1 parent 8af84dd commit 87f81d3

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

db_test.go

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
package dynamodbtest
2+
3+
import (
4+
"testing"
5+
)
6+
7+
func TestAll(t *testing.T) {
8+
// Log output to aid debugging
9+
LogOutput = true
10+
11+
// Start a new test process
12+
db, err := New()
13+
if err != nil {
14+
t.Fatal(err)
15+
}
16+
17+
url := db.URL()
18+
if url != "http://localhost:8000" {
19+
t.Error("URL is not correct")
20+
}
21+
22+
_err := db.Close()
23+
if _err != nil {
24+
t.Fatal(_err)
25+
}
26+
}

0 commit comments

Comments
 (0)