-
Notifications
You must be signed in to change notification settings - Fork 1
/
config_test.go
54 lines (46 loc) · 1.02 KB
/
config_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
package main
import (
"testing"
)
func TestPort(t *testing.T) {
port := port()
if port != ":8080" {
t.Fatalf(`Unexpected port %v`, port)
}
}
func TestPostgresHost(t *testing.T) {
host := postgresHost()
if host != "localhost" {
t.Fatalf(`Unexpected Postgres host %v`, host)
}
}
func TestPostgresPort(t *testing.T) {
port := postgresPort()
if port != "5432" {
t.Fatalf(`Unexpected Postgres port %v`, port)
}
}
func TestPostgresUser(t *testing.T) {
user := postgresUser()
if user != "postgres" {
t.Fatalf(`Unexpected Postgres user %v`, user)
}
}
func TestPostgresPassword(t *testing.T) {
password := postgresPassword()
if password != "postgres" {
t.Fatalf(`Unexpected Postgres password %v`, password)
}
}
func TestWeatherUri(t *testing.T) {
uri := weatherUri()
if uri != "https://api.openweathermap.org" {
t.Fatalf(`Unexpected Weather URI %v`, uri)
}
}
func TestWeatherAppid(t *testing.T) {
appid := weatherAppid()
if appid != "5b3f51e527ba4ee2ba87940ce9705cb5" {
t.Fatalf(`Unexpected App ID %v`, appid)
}
}