forked from poseidon/matchbox
-
Notifications
You must be signed in to change notification settings - Fork 0
/
fixtures.go
50 lines (44 loc) · 1.16 KB
/
fixtures.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
package testfakes
import (
"github.com/coreos/matchbox/matchbox/storage/storagepb"
)
var (
// Group is a machine group for testing.
Group = &storagepb.Group{
Id: "test-group",
Name: "test group",
Profile: "g1h2i3j4",
Selector: map[string]string{"uuid": "a1b2c3d4"},
Metadata: []byte(`{"pod_network":"10.2.0.0/16","service_name":"etcd2"}`),
}
// GroupNoMetadata is a Group without any metadata.
GroupNoMetadata = &storagepb.Group{
Id: "group-no-metadata",
Selector: map[string]string{"uuid": "a1b2c3d4"},
Metadata: nil,
}
// Profile is a machine profile for testing.
Profile = &storagepb.Profile{
Id: "g1h2i3j4",
Boot: &storagepb.NetBoot{
Kernel: "/image/kernel",
Initrd: []string{"/image/initrd_a", "/image/initrd_b"},
Args: []string{
"a=b",
"c",
},
},
CloudId: "cloud-config.tmpl",
IgnitionId: "ignition.tmpl",
GenericId: "generic.tmpl",
}
// IgnitionYAMLName is an Ignition template name for testing.
IgnitionYAMLName = "ignition.tmpl"
// IgnitionYAML is an Ignition template for testing.
IgnitionYAML = `ignition_version: 1
systemd:
units:
- name: etcd2.service
enable: true
`
)