github.com/coreos/mantle@v0.13.0/kola/tests/torcx/torcx.go (about) 1 // Copyright 2017 CoreOS, Inc. 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 package torcx 16 17 import ( 18 "github.com/coreos/mantle/kola/cluster" 19 "github.com/coreos/mantle/kola/register" 20 "github.com/coreos/mantle/platform/conf" 21 ) 22 23 func init() { 24 // Regression test for https://github.com/coreos/bugs/issues/2079 25 // Note: it would be preferable to not conflate docker + torcx in this 26 // testing, but rather to use a standalone torcx package/profile 27 register.Register(®ister.Test{ 28 Run: torcxEnable, 29 ClusterSize: 1, 30 Name: "torcx.enable-service", 31 UserData: conf.ContainerLinuxConfig(` 32 systemd: 33 units: 34 - name: docker.service 35 enable: true 36 `), 37 Distros: []string{"cl"}, 38 39 // https://github.com/coreos/mantle/issues/999 40 // On the qemu-unpriv platform the DHCP provides no data, pre-systemd 241 the DHCP server sending 41 // no routes to the link to spin in the configuring state. docker.service pulls in the network-online 42 // target which causes the basic machine checks to fail 43 ExcludePlatforms: []string{"qemu-unpriv"}, 44 }) 45 } 46 47 func torcxEnable(c cluster.TestCluster) { 48 m := c.Machines()[0] 49 output := c.MustSSH(m, `systemctl is-enabled docker`) 50 if string(output) != "enabled" { 51 c.Errorf("expected enabled, got %v", output) 52 } 53 }