mirror of
https://gitee.com/rainbond/Rainbond.git
synced 2024-11-29 18:27:58 +08:00
remove invalid log
This commit is contained in:
parent
3c7716924e
commit
ea02b6e6db
@ -152,7 +152,6 @@ func (d *DockerRunOrImageParse) ParseDockerun(cmd string) {
|
||||
if s == "docker" || s == "run" {
|
||||
continue
|
||||
}
|
||||
fmt.Println(name)
|
||||
if strings.HasPrefix(s, "-") {
|
||||
name = strings.TrimLeft(s, "-")
|
||||
index := strings.Index(name, "=")
|
||||
|
@ -38,12 +38,14 @@ var dockerrun = `docker run -d -P -v /usr/share/ca-certificates/:/etc/ssl/certs
|
||||
-initial-cluster etcd0=http://127.0.0.1:2380 \
|
||||
-initial-cluster-state new`
|
||||
|
||||
var test_case = `docker run --init jenkins/inbound-agent -url http://8080.grf8fccb.1b752ape.17f4cc.grapps.cn f51a0428be6049dc0ba7d4df4cda807b87b86fb21685ec9cba6956053210aadd agent01`
|
||||
|
||||
func TestParse(t *testing.T) {
|
||||
dockerclient, err := client.NewEnvClient()
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
p := CreateDockerRunOrImageParse("", "", dockerrun, dockerclient, nil)
|
||||
p := CreateDockerRunOrImageParse("", "", test_case, dockerclient, nil)
|
||||
if err := p.Parse(); err != nil {
|
||||
logrus.Errorf(err.Error())
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user