fmt: codestyle formatting
This commit is contained in:
parent
07bd09473c
commit
4b5a579b0b
|
|
@ -200,8 +200,8 @@ func stepExec(req *ExecutionRequest) bool {
|
||||||
|
|
||||||
cmd.Wait()
|
cmd.Wait()
|
||||||
|
|
||||||
//req.logEntry.Stdout = req.logEntry.StdoutBuffer.String()
|
// req.logEntry.Stdout = req.logEntry.StdoutBuffer.String()
|
||||||
//req.logEntry.Stderr = req.logEntry.StderrBuffer.String()
|
// req.logEntry.Stderr = req.logEntry.StderrBuffer.String()
|
||||||
|
|
||||||
req.logEntry.ExecutionCompleted = true
|
req.logEntry.ExecutionCompleted = true
|
||||||
req.logEntry.ExitCode = int32(cmd.ProcessState.ExitCode())
|
req.logEntry.ExitCode = int32(cmd.ProcessState.ExitCode())
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,12 @@
|
||||||
package httpservers
|
package httpservers
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"time"
|
"context"
|
||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
"net/http"
|
"net/http"
|
||||||
"nhooyr.io/websocket"
|
"nhooyr.io/websocket"
|
||||||
"nhooyr.io/websocket/wsjson"
|
"nhooyr.io/websocket/wsjson"
|
||||||
"context"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
func handleWebsocket(w http.ResponseWriter, r *http.Request) bool {
|
func handleWebsocket(w http.ResponseWriter, r *http.Request) bool {
|
||||||
|
|
@ -34,7 +34,6 @@ func handleWebsocket(w http.ResponseWriter, r *http.Request) bool {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
c.Close(websocket.StatusNormalClosure, "")
|
c.Close(websocket.StatusNormalClosure, "")
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,16 +1,16 @@
|
||||||
package httpservers
|
package httpservers
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
config "github.com/OliveTin/OliveTin/internal/config"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"os"
|
"os"
|
||||||
"testing"
|
"testing"
|
||||||
config "github.com/OliveTin/OliveTin/internal/config"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestGetWebuiDir(t *testing.T) {
|
func TestGetWebuiDir(t *testing.T) {
|
||||||
os.Chdir("../../") // go test sets the cwd to "httpservers" by default
|
os.Chdir("../../") // go test sets the cwd to "httpservers" by default
|
||||||
|
|
||||||
cfg = config.DefaultConfig();
|
cfg = config.DefaultConfig()
|
||||||
|
|
||||||
dir := findWebuiDir()
|
dir := findWebuiDir()
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue