Skip to content

Commit

Permalink
Merge branch 'fix-travis'
Browse files Browse the repository at this point in the history
  • Loading branch information
brimstone committed Mar 7, 2018
2 parents 4088325 + f145c4f commit e377cca
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ func runHandlers() {
}

func modeDaemon(cmd *cobra.Command, args []string) {
forever = make(chan bool)
log.Println("Reading kernel config")
err := readKernelConfig()
if err != nil {
Expand All @@ -73,6 +74,5 @@ func modeDaemon(cmd *cobra.Command, args []string) {
log.Println("Starting init handlers")
runHandlers()

forever = make(chan bool)
<-forever
}
14 changes: 7 additions & 7 deletions main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func Test_readKernelConfig(t *testing.T) {

err = readKernelConfig()
if err != nil {
t.Errorf("Error:", err.Error())
t.Errorf("Error: %s", err)
}
t.Log("Kernel config read without errors")
}
Expand Down Expand Up @@ -69,7 +69,7 @@ func Test_readConfig(t *testing.T) {

err := readConfig()
if err != nil {
t.Errorf("Error:", err.Error())
t.Errorf("Error: %s", err)
}
}

Expand Down Expand Up @@ -114,7 +114,7 @@ func Test_saveConfigError1(t *testing.T) {

err := saveConfig()
if err == nil {
t.Errorf("Error:", err.Error())
t.Errorf("Error: %s", err)
}
}

Expand All @@ -131,31 +131,31 @@ func Test_saveConfigError2(t *testing.T) {

err := saveConfig()
if err == nil {
t.Errorf("Error:", err.Error())
t.Errorf("Error: %s", err)
}
}

func Test_RealReadFileError(t *testing.T) {
t.Log("Testing RealReadFile read error")
_, err := RealReadFile("asdf")
if err == nil {
t.Errorf("Error:", err.Error())
t.Errorf("Error: %s", err)
}
}

func Test_RealWriteFileError(t *testing.T) {
t.Log("Testing RealWriteFile read error")
err := RealWriteFile("/asdf", []byte{}, 0644)
if err == nil {
t.Errorf("Error:", err.Error())
t.Errorf("Error: %s", err)
}
}

func Test_RealExecError(t *testing.T) {
t.Log("Testing RealExec read error")
_, err := RealExec("asdf")
if err == nil {
t.Errorf("Error:", err.Error())
t.Errorf("Error: %s", err)
}
}

Expand Down
2 changes: 1 addition & 1 deletion version.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func init() {
})
version = versionStruct{
APIVersion: API_VERSION,
Version: "TODO",
Version: "Testing",
GitCommit: COMMITHASH,
Builddatetime: BUILDDATETIME,
Arch: runtime.GOOS + "/" + runtime.GOARCH,
Expand Down

0 comments on commit e377cca

Please sign in to comment.