push
circle-ci
9015 of 11343 relevant lines covered (79.48%)
107.97 hits per line
1 |
package driver
|
|
2 |
|
|
3 |
import (
|
|
4 |
"context"
|
|
5 |
"net/url"
|
|
6 |
|
|
7 |
"github.com/ory/kratos/schema"
|
|
8 |
) |
|
9 |
|
|
10 |
func (m *RegistryDefault) IdentityTraitsSchemas(ctx context.Context) schema.Schemas {
|
2,303✔ |
11 |
ms := m.Configuration(ctx).IdentityTraitsSchemas() |
2,303✔ |
12 |
var ss schema.Schemas
|
2,303✔ |
13 |
|
2,303✔ |
14 |
for _, s := range ms { |
5,571✔ |
15 |
surl, err := url.Parse(s.URL) |
3,268✔ |
16 |
if err != nil { |
3,268✔ |
17 |
m.l.Fatalf("Could not parse url %s for schema %s", s.URL, s.ID)
|
× |
18 |
} |
× |
19 |
|
|
20 |
ss = append(ss, schema.Schema{
|
3,268✔ |
21 |
ID: s.ID, |
3,268✔ |
22 |
URL: surl, |
3,268✔ |
23 |
RawURL: s.URL, |
3,268✔ |
24 |
}) |
3,268✔ |
25 |
} |
|
26 |
|
|
27 |
return ss
|
2,303✔ |
28 |
} |