Fix test case
Fix test case

"TestRestartContainerwithRestartPolicy" contains some codes that could be
flaky, it's supposed to be fixed in #22256.

This commit removes unnecessary code, make the test case cleaner.

Signed-off-by: Zhang Wei <14976e959b2860fb06a3c1edbdb1945a4e11b8b5@huawei.com>

bonczj/moby-json-file-logger,justincormack/docker,twaugh/docker,mstanleyjones/docker,Ramzec/docker,denverdino/docker.github.io,noironetworks/docker,shin-/docker.github.io,crosbymichael/docker,londoncalling/docker.github.io,mahak/docker,joeuo/docker.github.io,kolyshkin/docker,yosifkit/docker,eskaaren/docker,BenHall/docker,darrenstahlmsft/docker,eskaaren/docker,jameszhan/docker,SvenDowideit/docker,mixja/docker,PatrickLang/moby,trebonian/docker,sfsmithcha/docker,mtanlee/docker,sterchelen/docker,johnstep/docker.github.io,shin-/docker.github.io,docker-zh/docker.github.io,pramodhkp/moby,isubuz/docker,moby/moby,Mokolea/docker,sdurrheimer/docker,hqhq/moby,rhardih/docker,Morsicus/docker,mohmost12/docker,medallia/docker,jameszhan/docker,ibuildthecloud/docker,shhsu/docker,charleszheng44/moby,jlhawn/docker,duglin/docker,nghiant2710/docker,denverdino/docker.github.io,ffoysal/docker,shin-/docker.github.io,anujbahuguna/docker,noxiouz/docker,sanscontext/docker.github.io,sheimi/docker,paralin/docker,moypray/docker,laijs/moby,mgoelzer/docker,JMesser81/docker,diogomonica/docker,shishir-a412ed/docker,pramodhkp/moby,unclejack/docker,Ramzec/docker,catinthesky/docker,johnstep/moby-moby,tophj-ibm/docker,phiroict/docker,13W/docker,docker/docker.github.io,mikebrow/docker,errordeveloper/docker,amatsus/docker,johnstep/docker.github.io,TheBigBear/docker,pramodhkp/moby,harche/docker,joeuo/docker.github.io,yongtang/docker,docker/docker,sean-jc/docker,abhinavdahiya/docker,tklauser/docker,estesp/docker,Syntaxide/docker,HideoYamauchi/docker,yosifkit/docker,moxiegirl/docker,kencochrane/docker,splunk/docker,coreos/docker,justyntemme/docker,afein/docker,gdevillele/docker.github.io,scotttlin/docker,joaofnfernandes/docker.github.io,moul/docker,Shopify/docker,danix800/docker.github.io,haveatry/docker,ndeloof/docker,ibuildthecloud/docker,xiekeyang/docker,sanscontext/docker.github.io,raja-sami-10p/moby,brahmaroutu/docker,cr7pt0gr4ph7/docker,coolljt0725/docker,gschaetz/moby,yasiramin10p/moby,thaJeztah/docker.github.io,whuwxl/docker,medallia/docker,asbjornenge/docker,sanjeo/docker,bearstech/moby,DoraALin/docker,troy0820/docker.github.io,portworx/docker,tophj-ibm/moby,charleszheng44/moby,maxamillion/docker,pecameron/docker,aduermael/docker.github.io,dgageot/docker,yasiramin10p/moby,dnephin/docker,mstanleyjones/docker,rhatdan/storage,mtrmac/docker,dmcgowan/docker,nalind/docker,kolyshkin/moby,paralin/docker,13W/docker,laijs/docker,coreos/docker,pradipd/moby,AkihiroSuda/docker,wenchma/docker,bonczj/moby-json-file-logger,shubheksha/docker.github.io,stevvooe/docker,jhorwit2/docker,rremer/moby,dongjoon-hyun/docker,lixiaobing1/docker,phiroict/docker,kerneltime/docker,djs55/docker,jzwlqx/denverdino.github.io,phiroict/docker,pecameron/docker,michael-holzheu/docker,hypriot/docker,containers/storage,naveed-jamil-tenpearls/moby,moxiegirl/docker,erikh/docker,flavio/docker,tmp6154/docker,TheBigBear/docker,tonistiigi/docker,q384566678/docker,KingEmet/docker,tklauser/docker,akira-baruah/docker,justyntemme/docker,rhardih/docker,mixja/docker,Syntaxide/docker,mikedougherty/docker,xuxinkun/docker,SvenDowideit/docker,q384566678/docker,docker/docker.github.io,JimGalasyn/docker.github.io,joaofnfernandes/docker.github.io,konstruktoid/docker-1,abhinavdahiya/docker,sfsmithcha/docker,dsheets/moby,mikebrow/docker,mkumatag/docker,gschaetz/moby,lixiaobing1/docker,nghiant2710/docker,allencloud/docker,sanjeo/docker,Tenk42/docker,Ramzec/docker,mahak/docker,dgageot/docker,13W/docker,kolyshkin/moby,medallia/docker,asbjornenge/docker,resin-io/docker,liaoqingwei/docker,tagomoris/docker,Altiscale/docker,noironetworks/docker,BSWANG/denverdino.github.io,anujbahuguna/docker,docker/docker,toli/docker,thaJeztah/docker.github.io,jwhonce/docker,johnstep/moby-moby,djs55/docker,michelvocks/docker,projectatomic/docker,menglingwei/denverdino.github.io,PatrickLang/moby,coolljt0725/docker,justincormack/docker,ColinHebert/docker,catinthesky/docker,jameszhan/docker,portworx/docker,troy0820/docker.github.io,aduermael/docker.github.io,thaJeztah/docker,POLJM242/docker,JimGalasyn/docker.github.io,dmcgowan/docker,cpuguy83/docker,konstruktoid/docker-upstream,johnstep/docker.github.io,shishir-a412ed/docker,charleszheng44/moby,denverdino/denverdino.github.io,bonczj/moby-json-file-logger,dsheets/moby,jvanz/docker,crosbymichael/docker,johnstep/moby-moby,JimGalasyn/docker.github.io,erikstmartin/docker,errordeveloper/docker,rancher/docker,raja-sami-10p/moby,mkumatag/docker,harche/docker,KingEmet/docker,imkin/moby,x1022as/docker,charleswhchan/docker,diogomonica/docker,naveed-jamil-tenpearls/moby,allencloud/docker,LuisBosquez/docker.github.io,rancher/docker,ibuildthecloud/docker,justincormack/docker,jlebon/docker,alexisbellido/docker.github.io,jwhonce/docker,14rcole/docker,thaJeztah/docker.github.io,lixiaobing1/docker,charleswhchan/docker,anweiss/docker.github.io,michelvocks/docker,kolyshkin/moby,coolljt0725/docker,jongiddy/docker,joaofnfernandes/docker.github.io,rhatdan/docker,Tenk42/docker,tklauser/docker,cloudflare/docker,kojiromike/docker,zhuguihua/docker,unclejack/docker,icaoweiwei/docker,darrenstahlmsft/moby,TheBigBear/docker,yummypeng/docker,coreos/docker,denverdino/docker.github.io,jthelin/docker,ajaymdesai/docker,asbjornenge/docker,sean-jc/docker,jongiddy/docker,miminar/docker,zhuguihua/docker,qudongfang/docker,cpuguy83/docker,gdevillele/docker.github.io,icaoweiwei/docker,mtesselH/docker,konstruktoid/docker-1,jlhawn/docker,sean-jc/docker,LuisBosquez/docker.github.io,yummypeng/docker,jzwlqx/denverdino.github.io,mtanlee/docker,danix800/docker.github.io,liaoqingwei/docker,mtesselH/docker,whuwxl/docker,toli/docker,kerneltime/docker,shin-/docker.github.io,tagomoris/docker,thaJeztah/docker,denverdino/denverdino.github.io,nalind/docker,ripcurld0/moby,YuPengZTE/docker,willmtemple/docker,mikedougherty/docker,shhsu/docker,SvenDowideit/docker,anweiss/docker.github.io,danyalKhaliq10p/moby,mtrmac/docker,mgoelzer/docker,crosbymichael/docker,diogomonica/docker,jimjag/docker,scotttlin/docker,thaJeztah/docker,14rcole/docker,yummypeng/docker,harche/docker,sanscontext/docker.github.io,xiaods/docker,docker/docker.github.io,containers/storage,stevvooe/docker,noxiouz/docker,shubheksha/docker.github.io,kencochrane/docker,akira-baruah/docker,cpuguy83/docker,ffoysal/docker,yp-engineering/docker,haveatry/docker,madhanrm/docker,whuwxl/docker,lixiaobing10051267/docker,scotttlin/docker,fcrisciani/docker,moypray/docker,raja-sami-10p/moby,yasiramin10p/moby,joeuo/docker.github.io,sunyuan3/docker,q384566678/docker,aduermael/docker.github.io,splunk/docker,HuKeping/docker,duglin/docker,amatsus/docker,tophj-ibm/docker,BenHall/docker,qudongfang/docker,kencochrane/docker,BSWANG/denverdino.github.io,xiekeyang/docker,rremer/moby,shishir-a412ed/docker,qudongfang/docker,haveatry/docker,denverdino/denverdino.github.io,mikedougherty/docker,menglingwei/denverdino.github.io,cloudflare/docker,tianon/docker,mohmost12/docker,alfred-landrum/docker,kojiromike/docker,willmtemple/docker,stainboy/docker,jimjag/docker,endophage/docker,jvanz/docker,portworx/docker,dsau/docker,prertik/docker,aduermael/docker.github.io,gnailuy/docker,YuPengZTE/docker,LuisBosquez/docker.github.io,yosifkit/docker,shubheksha/docker.github.io,projectatomic/docker,estesp/docker,tkopczynski/docker,dgageot/docker,michael-holzheu/docker,xiaods/docker,dperny/docker,Morsicus/docker,dccurtis/docker,moypray/docker,gdevillele/docker.github.io,projectatomic/docker,endophage/docker,jvanz/docker,jlebon/docker,mixja/docker,ffoysal/docker,shubheksha/docker.github.io,joaofnfernandes/docker.github.io,miminar/docker,danix800/docker.github.io,phiroict/docker,bluebreezecf/docker,dims/docker,jzwlqx/denverdino.github.io,AkihiroSuda/docker,Ramzec/docker,gigidwan/docker,x1022as/docker,bluebreezecf/docker,yp-engineering/docker,brahmaroutu/docker,menglingwei/denverdino.github.io,bearstech/moby,sanscontext/docker.github.io,thaJeztah/docker,jlhawn/docker,moby/moby,madhanrm/docker,gschaetz/moby,abhinavdahiya/docker,maxamillion/docker,ibuildthecloud/docker,amatsus/docker,KarthikNayak/docker,KarthikNayak/docker,tophj-ibm/docker,shhsu/docker,johnstep/docker.github.io,jwhonce/docker,hqhq/moby,errordeveloper/docker,Mokolea/docker,JMesser81/docker,brahmaroutu/docker,gjaskiewicz/moby,thtanaka/docker,wenchma/docker,rillig/docker.github.io,twaugh/docker,bdwill/docker.github.io,justyntemme/docker,londoncalling/docker.github.io,hypriot/docker,ibuildthecloud/docker,docker/docker.github.io,dccurtis/docker,gigidwan/docker,tophj-ibm/moby,denverdino/docker.github.io,troy0820/docker.github.io,mtesselH/docker,dnephin/docker,gjaskiewicz/moby,anweiss/docker.github.io,docker-zh/docker.github.io,joaofnfernandes/docker.github.io,rancher/docker,xuxinkun/docker,konstruktoid/docker-upstream,DoraALin/docker,fcrisciani/docker,mgoelzer/docker,laijs/docker,johnstep/docker.github.io,cr7pt0gr4ph7/docker,docker/docker.github.io,sarnautov/moby,sterchelen/docker,shin-/docker.github.io,nawawi/docker,nawawi/docker,dongjoon-hyun/docker,darrenstahlmsft/moby,x1022as/docker,HuKeping/docker,duglin/docker,mstanleyjones/docker,cyphar/docker,Shopify/docker,imkin/moby,twaugh/docker,alexisbellido/docker.github.io,trebonian/docker,tonistiigi/docker,xuxinkun/docker,moul/docker,Morsicus/docker,tonistiigi/docker,flavio/docker,msabansal/docker,BSWANG/denverdino.github.io,dperny/docker,ajaymdesai/docker,AkihiroSuda/docker,alfred-landrum/docker,naveed-jamil-tenpearls/moby,lixiaobing10051267/docker,vdemeester/docker,miminar/docker,alexisbellido/docker.github.io,dnephin/docker,sdurrheimer/docker,bearstech/moby,JMesser81/docker,danix800/docker.github.io,dims/docker,tkopczynski/docker,moul/docker,yongtang/docker,toli/docker,docker-zh/docker.github.io,erikh/docker,HuKeping/docker,bearstech/moby,laijs/moby,darrenstahlmsft/moby,shubheksha/docker.github.io,srust/docker,dccurtis/docker,gigidwan/docker,docker-zh/docker.github.io,rhatdan/docker,dsheets/moby,hypriot/docker,menglingwei/denverdino.github.io,vdemeester/docker,sterchelen/docker,paralin/docker,darrenstahlmsft/docker,flavio/docker,Mokolea/docker,BSWANG/denverdino.github.io,dsau/docker,willmtemple/docker,ajaymdesai/docker,yp-engineering/docker,troy0820/docker.github.io,stainboy/docker,Mokolea/docker,isubuz/docker,vdemeester/docker,denverdino/denverdino.github.io,DoraALin/docker,konstruktoid/docker-upstream,gdevillele/docker.github.io,phiroict/docker,lixiaobing10051267/docker,estesp/docker,BSWANG/denverdino.github.io,LuisBosquez/docker.github.io,noironetworks/docker,fcrisciani/docker,stevvooe/docker,mike1729/docker,joeuo/docker.github.io,splunk/docker,yosifkit/docker,dmcgowan/docker,containers/storage,bluebreezecf/docker,moby/moby,mtanlee/docker,xiaods/docker,mikebrow/docker,konstruktoid/docker-1,dsau/docker,paralin/docker,jongiddy/docker,cyphar/docker,zhuguihua/docker,msabansal/docker,cloudflare/docker,thtanaka/docker,joeuo/docker.github.io,PatrickLang/moby,bdwill/docker.github.io,eskaaren/docker,denverdino/denverdino.github.io,pradipd/moby,resin-io/docker,charleswhchan/docker,cpuguy83/docker,hqhq/moby,JimGalasyn/docker.github.io,imkin/moby,rillig/docker.github.io,prertik/docker,moxiegirl/docker,liaoqingwei/docker,bdwill/docker.github.io,trebonian/docker,sheimi/docker,prertik/docker,HideoYamauchi/docker,srust/docker,tagomoris/docker,KarthikNayak/docker,ndeloof/docker,xiekeyang/docker,gnailuy/docker,nghiant2710/docker,alexisbellido/docker.github.io,nalind/docker,ColinHebert/docker,kolyshkin/docker,noxiouz/docker,bdwill/docker.github.io,madhanrm/docker,danyalKhaliq10p/moby,thaJeztah/docker.github.io,cr7pt0gr4ph7/docker,ndeloof/docker,rremer/moby,mike1729/docker,cyphar/docker,13W/docker,jhorwit2/docker,afein/docker,jimjag/docker,sunyuan3/docker,yongtang/docker,erikstmartin/docker,mike1729/docker,londoncalling/docker.github.io,mkumatag/docker,kunalkushwaha/docker,jhorwit2/docker,sheimi/docker,pradipd/moby,rillig/docker.github.io,flavio/docker,icaoweiwei/docker,Shopify/docker,HideoYamauchi/docker,darrenstahlmsft/docker,gjaskiewicz/moby,michelvocks/docker,konstruktoid/docker-upstream,jimjag/docker,Syntaxide/docker,menglingwei/denverdino.github.io,Altiscale/docker,wenchma/docker,JimGalasyn/docker.github.io,rhatdan/storage,POLJM242/docker,tmp6154/docker,AkihiroSuda/docker,erikh/docker,msabansal/docker,danyalKhaliq10p/moby,dims/docker,anujbahuguna/docker,trebonian/docker,mohmost12/docker,unclejack/docker,kojiromike/docker,tophj-ibm/moby,resin-io/docker,anweiss/docker.github.io,sanscontext/docker.github.io,jzwlqx/denverdino.github.io,mahak/docker,alexisbellido/docker.github.io,jzwlqx/denverdino.github.io,tianon/docker,maxamillion/docker,afein/docker,endophage/docker,bdwill/docker.github.io,djs55/docker,13W/docker,kerneltime/docker,moby/moby,sdurrheimer/docker,docker-zh/docker.github.io,rillig/docker.github.io,erikstmartin/docker,rhatdan/docker,kunalkushwaha/docker,BenHall/docker,mtrmac/docker,sarnautov/moby,dongjoon-hyun/docker,kunalkushwaha/docker,YuPengZTE/docker,catinthesky/docker,docker/docker,ColinHebert/docker,gnailuy/docker,nalind/docker,londoncalling/docker.github.io,isubuz/docker,gdevillele/docker.github.io,denverdino/docker.github.io,nawawi/docker,moul/docker,alfred-landrum/docker,medallia/docker,tkopczynski/docker,stainboy/docker,michael-holzheu/docker,dperny/docker,londoncalling/docker.github.io,mahak/docker,sfsmithcha/docker,LuisBosquez/docker.github.io,srust/docker,laijs/moby,ripcurld0/moby,ripcurld0/moby,jlebon/docker,tmp6154/docker,gnailuy/docker,thaJeztah/docker.github.io,thtanaka/docker,sarnautov/moby,allencloud/docker,sunyuan3/docker,nawawi/docker,jthelin/docker,rhatdan/storage,KingEmet/docker,laijs/docker,pecameron/docker,Tenk42/docker,Altiscale/docker,anweiss/docker.github.io,sanjeo/docker