diff --git a/cmd/console/console.go b/cmd/console/console.go index 7efed82f..3be06437 100644 --- a/cmd/console/console.go +++ b/cmd/console/console.go @@ -173,7 +173,7 @@ func writeRespawn() error { p := path.Join("/etc/respawn.conf.d", f.Name()) content, err := ioutil.ReadFile(p) if err != nil { - log.Error("Failed to read %s: %v", p, err) + log.Errorf("Failed to read %s: %v", p, err) continue } respawn += fmt.Sprintf("\n%s", string(content)) diff --git a/cmd/switchconsole/switch_console.go b/cmd/switchconsole/switch_console.go index 38362fca..21905d17 100644 --- a/cmd/switchconsole/switch_console.go +++ b/cmd/switchconsole/switch_console.go @@ -25,7 +25,7 @@ func Main() { } if newConsole != "default" { - project.ServiceConfigs.Add("console", &composeConfig.ServiceConfig{}) + project.ServiceConfigs.Add("console", &composeConfig.ServiceConfig{}) if err = compose.LoadService(project, cfg, true, newConsole); err != nil { log.Fatal(err) diff --git a/config/config_test.go b/config/config_test.go index 7e814083..588bc320 100644 --- a/config/config_test.go +++ b/config/config_test.go @@ -202,12 +202,12 @@ func TestSet(t *testing.T) { } type OuterData struct { - One Data `"yaml:one"` + One Data `yaml:"one"` } type Data struct { - Two bool `"yaml:two"` - Three bool `"yaml:three"` + Two bool `yaml:"two"` + Three bool `yaml:"three"` } func TestMapMerge(t *testing.T) { diff --git a/tests/mounts_test.go b/tests/mounts_test.go index f7eecd5a..ff92444d 100644 --- a/tests/mounts_test.go +++ b/tests/mounts_test.go @@ -8,10 +8,10 @@ func (s *QemuSuite) TestMounts(c *C) { s.CheckCall(c, "cat /home/rancher/test | grep test") - s.CheckCall(c, "mkdir -p /home/rancher/a /home/rancher/b /home/rancher/c") - s.CheckCall(c, "sudo mkfs.ext4 /dev/vdb") - s.CheckCall(c, "sudo cloud-init-execute") - s.CheckCall(c, "mount | grep /home/rancher/a") - s.CheckCall(c, "mount | grep /home/rancher/b") - s.CheckCall(c, "mount | grep /home/rancher/c") + s.CheckCall(c, "mkdir -p /home/rancher/a /home/rancher/b /home/rancher/c") + s.CheckCall(c, "sudo mkfs.ext4 /dev/vdb") + s.CheckCall(c, "sudo cloud-init-execute") + s.CheckCall(c, "mount | grep /home/rancher/a") + s.CheckCall(c, "mount | grep /home/rancher/b") + s.CheckCall(c, "mount | grep /home/rancher/c") }