func init() { udpConf := new(bytes.Buffer) if err := flannelConf.Execute(udpConf, "udp"); err != nil { panic(err) } register.Register(®ister.Test{ Run: udp, ClusterSize: 3, Name: "coreos.flannel.udp", Platforms: []string{"aws", "gce"}, UserData: udpConf.String(), }) vxlanConf := new(bytes.Buffer) if err := flannelConf.Execute(vxlanConf, "vxlan"); err != nil { panic(err) } register.Register(®ister.Test{ Run: vxlan, ClusterSize: 3, Name: "coreos.flannel.vxlan", Platforms: []string{"aws", "gce"}, UserData: vxlanConf.String(), }) }
func init() { // test etcd discovery with 0.4.7 register.Register(®ister.Test{ Run: DiscoveryV1, Manual: true, ClusterSize: 3, Name: "coreos.etcd0.discovery", UserData: `#cloud-config coreos: etcd: name: $name discovery: $discovery addr: $private_ipv4:2379 peer-addr: $private_ipv4:2380`, }) // test etcd discovery with 2.0 with new cloud config register.Register(®ister.Test{ Run: DiscoveryV2, ClusterSize: 3, Name: "coreos.etcd2.discovery", UserData: `#cloud-config coreos: etcd2: name: $name discovery: $discovery advertise-client-urls: http://$private_ipv4:2379 initial-advertise-peer-urls: http://$private_ipv4:2380 listen-client-urls: http://0.0.0.0:2379,http://0.0.0.0:4001 listen-peer-urls: http://$private_ipv4:2380,http://$private_ipv4:7001`, }) }
func init() { register.Register(®ister.Test{ Name: "coreos.basic", Run: LocalTests, ClusterSize: 1, NativeFuncs: map[string]func() error{ "CloudConfig": TestCloudinitCloudConfig, "Script": TestCloudinitScript, "PortSSH": TestPortSsh, "DbusPerms": TestDbusPerms, "Symlink": TestSymlinkResolvConf, "UpdateEngineKeys": TestInstalledUpdateEngineRsaKeys, "ServicesActive": TestServicesActive, "ReadOnly": TestReadOnlyFs, "RandomUUID": TestFsRandomUUID, "Useradd": TestUseradd, }, }) register.Register(®ister.Test{ Name: "coreos.cluster", Run: ClusterTests, ClusterSize: 3, NativeFuncs: map[string]func() error{ "EtcdUpdateValue": TestEtcdUpdateValue, "FleetctlRunService": TestFleetctlRunService, }, UserData: `#cloud-config coreos: etcd2: name: $name discovery: $discovery advertise-client-urls: http://$private_ipv4:2379 initial-advertise-peer-urls: http://$private_ipv4:2380 listen-client-urls: http://0.0.0.0:2379,http://0.0.0.0:4001 listen-peer-urls: http://$private_ipv4:2380,http://$private_ipv4:7001 fleet: etcd-request-timeout: 15 units: - name: etcd2.service command: start - name: fleet.service command: start`, }) // tests requiring network connection to internet register.Register(®ister.Test{ Name: "coreos.internet", Run: InternetTests, ClusterSize: 1, Platforms: []string{"gce", "aws"}, NativeFuncs: map[string]func() error{ "UpdateEngine": TestUpdateEngine, "DockerPing": TestDockerPing, "DockerEcho": TestDockerEcho, "NTPDate": TestNTPDate, }, }) }
func init() { // Reformat the root as btrfs register.Register(®ister.Test{ Name: "coreos.ignition.btrfsroot", Run: btrfsRoot, ClusterSize: 1, Platforms: []string{"aws"}, UserData: `{ "ignitionVersion": 1, "storage": { "filesystems": [ { "device": "/dev/disk/by-label/ROOT", "format": "btrfs", "create": { "force": true, "options": [ "--label=ROOT" ] } } ] } }`, }) // Reformat the root as xfs register.Register(®ister.Test{ Name: "coreos.ignition.xfsroot", Run: xfsRoot, ClusterSize: 1, Platforms: []string{"aws"}, UserData: `{ "ignitionVersion": 1, "storage": { "filesystems": [ { "device": "/dev/disk/by-label/ROOT", "format": "xfs", "create": { "force": true, "options": [ "-L", "ROOT" ] } } ] } }`, }) }
func init() { register.Register(®ister.Test{ Run: NFSv3, ClusterSize: 0, Name: "linux.nfs.v3", Platforms: []string{"qemu", "aws"}, }) register.Register(®ister.Test{ Run: NFSv4, ClusterSize: 0, Name: "linux.nfs.v4", Platforms: []string{"qemu", "aws"}, }) }
func init() { register.Register(®ister.Test{ Run: Proxy, ClusterSize: 0, Name: "coreos.fleet.etcdproxy", }) }
func init() { // Set the hostname register.Register(®ister.Test{ Name: "coreos.ignition.sethostname", Run: setHostname, ClusterSize: 1, Platforms: []string{"aws"}, UserData: `{ "ignitionVersion": 1, "storage": { "filesystems": [ { "device": "/dev/disk/by-partlabel/ROOT", "format": "ext4", "files": [ { "path": "/etc/hostname", "mode": 420, "contents": "core1" } ] } ] } }`, }) }
func init() { register.Register(®ister.Test{ Run: JournalRemote, ClusterSize: 0, Name: "systemd.journal.remote", }) }
func init() { register.Register(®ister.Test{ Run: Install, ClusterSize: 0, Name: "coreos.rkt.install", }) }
func init() { register.Register(®ister.Test{ Name: "coreos.metadata.aws", Run: verifyAWS, ClusterSize: 1, Platforms: []string{"aws"}, UserData: `{ "ignitionVersion": 1, "systemd": { "units": [ { "name": "coreos-metadata.service", "enable": true }, { "name": "metadata.target", "enable": true, "contents": "[Install]\nWantedBy=multi-user.target" } ] } }`, }) register.Register(®ister.Test{ Name: "coreos.metadata.azure", Run: verifyAzure, ClusterSize: 1, Platforms: []string{"azure"}, UserData: `{ "ignitionVersion": 1, "systemd": { "units": [ { "name": "coreos-metadata.service", "enable": true }, { "name": "metadata.target", "enable": true, "contents": "[Install]\nWantedBy=multi-user.target" } ] } }`, }) }
func init() { register.Register(®ister.Test{ Run: NTP, ClusterSize: 0, Name: "linux.ntp", Platforms: []string{"qemu"}, }) }
func init() { register.Register(®ister.Test{ Run: VerityVerify, ClusterSize: 1, Name: "coreos.verity.verify", Platforms: []string{"qemu", "aws", "gce"}, }) }
func init() { register.Register(®ister.Test{ Run: OmahaPing, ClusterSize: 1, Name: "coreos.omaha.ping", Platforms: []string{"qemu"}, UserData: `#cloud-config coreos: update: server: "http://10.0.0.1:34567/v1/update/" `, }) }
func init() { for i := range tags { // use closure to store a version tag in a Test t := tags[i] f := func(c platform.TestCluster) error { return CoreOSBasic(c, t) } register.Register(®ister.Test{ Name: "google.kubernetes.coreosbasic." + tags[i], Run: f, ClusterSize: 0, Platforms: []string{"gce", "aws"}, }) } }