about summary refs log tree commit diff
path: root/db_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'db_test.go')
-rw-r--r--db_test.go69
1 files changed, 69 insertions, 0 deletions
diff --git a/db_test.go b/db_test.go
new file mode 100644
index 0000000..033cd6d
--- /dev/null
+++ b/db_test.go
@@ -0,0 +1,69 @@
+package main
+
+import (
+	"database/sql"
+	"reflect"
+	"testing"
+)
+
+func Test_connectToDatabase(t *testing.T) {
+	tests := []struct {
+		name string
+	}{
+		// TODO: Add test cases.
+	}
+	for _, tt := range tests {
+		t.Run(tt.name, func(t *testing.T) {
+			connectToDatabase()
+		})
+	}
+}
+
+func Test_connectToDB(t *testing.T) {
+	tests := []struct {
+		name string
+		want *sql.DB
+	}{
+		// TODO: Add test cases.
+	}
+	for _, tt := range tests {
+		t.Run(tt.name, func(t *testing.T) {
+			if got := connectToDB(); !reflect.DeepEqual(got, tt.want) {
+				t.Errorf("connectToDB() = %v, want %v", got, tt.want)
+			}
+		})
+	}
+}
+
+func Test_dbConnect(t *testing.T) {
+	type args struct {
+		connStr string
+	}
+	tests := []struct {
+		name string
+		args args
+		want *sql.DB
+	}{
+		// TODO: Add test cases.
+	}
+	for _, tt := range tests {
+		t.Run(tt.name, func(t *testing.T) {
+			if got := dbConnect(tt.args.connStr); !reflect.DeepEqual(got, tt.want) {
+				t.Errorf("dbConnect() = %v, want %v", got, tt.want)
+			}
+		})
+	}
+}
+
+func Test_pingDB(t *testing.T) {
+	tests := []struct {
+		name string
+	}{
+		// TODO: Add test cases.
+	}
+	for _, tt := range tests {
+		t.Run(tt.name, func(t *testing.T) {
+			pingDB()
+		})
+	}
+}