fix(laya): extend shared CPU ranking timeout
This commit is contained in:
25
backend/internal/server/laya_timeout_ticket31_test.go
Normal file
25
backend/internal/server/laya_timeout_ticket31_test.go
Normal file
@ -0,0 +1,25 @@
|
||||
package server
|
||||
|
||||
import (
|
||||
"gopkg.in/yaml.v3"
|
||||
"os"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestTicket31ComposeLayaTimeoutDefaultAndOverride(t *testing.T) {
|
||||
for _, path := range []string{"../../../docker-compose.yml", "../../../docker-compose.prod.yml"} {
|
||||
data, err := os.ReadFile(path)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
var document struct {
|
||||
Services map[string]struct{ Environment map[string]string }
|
||||
}
|
||||
if err = yaml.Unmarshal(data, &document); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if got := document.Services["backend"].Environment["LAYA_TIMEOUT"]; got != "${LAYA_TIMEOUT:-5m}" {
|
||||
t.Errorf("%s timeout=%q", path, got)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user