feat: refactor to ymsctl & yms-daemon
This commit is contained in:
@@ -50,6 +50,24 @@ func TestParseUpdateArgsAcceptsContainerImage(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestParseUpdateArgsControlsContainerStartupLogs(t *testing.T) {
|
||||
imageReference := "harbor.ymswell.asia/ymswell/glory-ymswell:20260813-184902-a37bf50d-v1.1.8.1"
|
||||
request, err := parseUpdateArgs([]string{"--service", "backend", "--container-image", imageReference, "--no-start-log"}, &bytes.Buffer{})
|
||||
if err != nil {
|
||||
t.Fatalf("parse no-start-log container update arguments: %v", err)
|
||||
}
|
||||
if request.startLog {
|
||||
t.Fatal("--no-start-log did not disable startup logs")
|
||||
}
|
||||
request, err = parseUpdateArgs([]string{"--service", "backend", "--container-image", imageReference}, &bytes.Buffer{})
|
||||
if err != nil {
|
||||
t.Fatalf("parse default container update arguments: %v", err)
|
||||
}
|
||||
if !request.startLog {
|
||||
t.Fatal("container startup logs are not enabled by default")
|
||||
}
|
||||
}
|
||||
|
||||
func TestParseUpdateArgsRejectsNativeJARAndContainerImageTogether(t *testing.T) {
|
||||
jarPath := filepath.Join(t.TempDir(), "glory-soft-yms.jar")
|
||||
arguments := []string{
|
||||
|
||||
Reference in New Issue
Block a user