blob: 5c16aa142f790ba19cf72aca977322fdd1fcebf7 (
plain)
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
|
package main
import (
"testing"
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/assert"
)
func TestReadProjects(t *testing.T) {
*pagesDomain = "test.io"
d := make(domains)
err := d.ReadGroups()
require.NoError(t, err)
var domains []string
for domain, _ := range d {
domains = append(domains, domain)
}
expectedDomains := []string{
"group.test.io",
"group.internal.test.io",
"test.domain.com", // from config.json
"other.domain.com",
}
for _, expected := range domains {
assert.Contains(t, domains, expected)
}
for _, actual := range domains {
assert.Contains(t, expectedDomains, actual)
}
}
|