Skip to content

Commit

Permalink
Test failing in Travis
Browse files Browse the repository at this point in the history
  • Loading branch information
uaalto committed Aug 17, 2015
1 parent db7487c commit 99c65b2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/github.com/getlantern/osversion/osversion_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func GetHumanReadable() (string, error) {
// Try to get the distribution info
fData, err := ioutil.ReadFile("/etc/os-release")
if err != nil {
return fmt.Sprintf("kernel %s", kernel), nil
return fmt.Sprintf("kernel: %s", kernel), nil
}

// At least Fedora, Debian, Ubuntu and Arch support this approach
Expand Down
8 changes: 4 additions & 4 deletions src/github.com/getlantern/osversion/osversion_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ func TestString(t *testing.T) {
t.Fatal("Error getting string")
}
if !reg.MatchString(str) {
t.Fatal("Improper string format")
t.Fatal("Improper string format: %s", str)
}
}

Expand All @@ -35,7 +35,7 @@ func TestHumanReadable(t *testing.T) {
}
reg := regexp.MustCompile(".+kernel.+")
if !reg.MatchString(str) {
t.Fatal("Improper human readable format")
t.Fatal("Improper human readable format: %s", str)
}
case "windows":
str, err := GetHumanReadable()
Expand All @@ -44,9 +44,9 @@ func TestHumanReadable(t *testing.T) {
}
reg := regexp.MustCompile("Windows .+")
if !reg.MatchString(str) {
t.Fatal("Improper human readable format")
t.Fatal("Improper human readable format: %s", str)
}
default:
t.Fatal("Unsupported OS detected")
t.Fatal("Unsupported OS detected: %s", runtime.GOOS)
}
}

0 comments on commit 99c65b2

Please sign in to comment.