Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 2a05dfc166 |
@@ -27,7 +27,7 @@ func TestHealthz(t *testing.T) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
defer func() { _ = resp.Body.Close() }()
|
defer resp.Body.Close()
|
||||||
if resp.StatusCode != http.StatusOK {
|
if resp.StatusCode != http.StatusOK {
|
||||||
t.Fatalf("got %d, want 200", resp.StatusCode)
|
t.Fatalf("got %d, want 200", resp.StatusCode)
|
||||||
}
|
}
|
||||||
@@ -41,7 +41,7 @@ func TestTenantBySlug_acme(t *testing.T) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
defer func() { _ = resp.Body.Close() }()
|
defer resp.Body.Close()
|
||||||
if resp.StatusCode != http.StatusOK {
|
if resp.StatusCode != http.StatusOK {
|
||||||
body, _ := io.ReadAll(resp.Body)
|
body, _ := io.ReadAll(resp.Body)
|
||||||
t.Fatalf("got %d, want 200; body=%s", resp.StatusCode, body)
|
t.Fatalf("got %d, want 200; body=%s", resp.StatusCode, body)
|
||||||
@@ -66,7 +66,7 @@ func TestTenantBySlug_unknown(t *testing.T) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
defer func() { _ = resp.Body.Close() }()
|
defer resp.Body.Close()
|
||||||
if resp.StatusCode != http.StatusNotFound {
|
if resp.StatusCode != http.StatusNotFound {
|
||||||
t.Fatalf("got %d, want 404", resp.StatusCode)
|
t.Fatalf("got %d, want 404", resp.StatusCode)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -89,7 +89,7 @@ func TestMigrate_upDownRoundTrip(t *testing.T) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
defer func() { _ = db.Close() }()
|
defer db.Close()
|
||||||
|
|
||||||
wantTables := []string{
|
wantTables := []string{
|
||||||
"tenants",
|
"tenants",
|
||||||
@@ -183,7 +183,7 @@ func TestSeed_canInsertAndQuery(t *testing.T) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
defer func() { _ = db.Close() }()
|
defer db.Close()
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
|
|
||||||
var tid string
|
var tid string
|
||||||
@@ -266,7 +266,7 @@ func TestSlugConstraint(t *testing.T) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
defer func() { _ = db.Close() }()
|
defer db.Close()
|
||||||
|
|
||||||
cases := []struct {
|
cases := []struct {
|
||||||
slug string
|
slug string
|
||||||
|
|||||||
Reference in New Issue
Block a user