mirror of
https://github.com/juanfont/headscale.git
synced 2024-11-29 18:33:05 +00:00
Fix issue were dockertest fails to start because of container mismatch
This commit is contained in:
parent
32a6151df9
commit
566b8c3df3
3 changed files with 15 additions and 0 deletions
|
@ -68,6 +68,11 @@ func (s *IntegrationCLITestSuite) SetupTest() {
|
||||||
Cmd: []string{"headscale", "serve"},
|
Cmd: []string{"headscale", "serve"},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
err = s.pool.RemoveContainerByName(headscaleHostname)
|
||||||
|
if err != nil {
|
||||||
|
s.FailNow(fmt.Sprintf("Could not remove existing container before building test: %s", err), "")
|
||||||
|
}
|
||||||
|
|
||||||
fmt.Println("Creating headscale container")
|
fmt.Println("Creating headscale container")
|
||||||
if pheadscale, err := s.pool.BuildAndRunWithBuildOptions(headscaleBuildOptions, headscaleOptions, DockerRestartPolicy); err == nil {
|
if pheadscale, err := s.pool.BuildAndRunWithBuildOptions(headscaleBuildOptions, headscaleOptions, DockerRestartPolicy); err == nil {
|
||||||
s.headscale = *pheadscale
|
s.headscale = *pheadscale
|
||||||
|
|
|
@ -129,6 +129,11 @@ func (s *IntegrationDERPTestSuite) SetupSuite() {
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
err = s.pool.RemoveContainerByName(headscaleHostname)
|
||||||
|
if err != nil {
|
||||||
|
s.FailNow(fmt.Sprintf("Could not remove existing container before building test: %s", err), "")
|
||||||
|
}
|
||||||
|
|
||||||
log.Println("Creating headscale container")
|
log.Println("Creating headscale container")
|
||||||
if pheadscale, err := s.pool.BuildAndRunWithBuildOptions(headscaleBuildOptions, headscaleOptions, DockerRestartPolicy); err == nil {
|
if pheadscale, err := s.pool.BuildAndRunWithBuildOptions(headscaleBuildOptions, headscaleOptions, DockerRestartPolicy); err == nil {
|
||||||
s.headscale = *pheadscale
|
s.headscale = *pheadscale
|
||||||
|
|
|
@ -246,6 +246,11 @@ func (s *IntegrationTestSuite) SetupSuite() {
|
||||||
Cmd: []string{"headscale", "serve"},
|
Cmd: []string{"headscale", "serve"},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
err = s.pool.RemoveContainerByName(headscaleHostname)
|
||||||
|
if err != nil {
|
||||||
|
s.FailNow(fmt.Sprintf("Could not remove existing container before building test: %s", err), "")
|
||||||
|
}
|
||||||
|
|
||||||
log.Println("Creating headscale container")
|
log.Println("Creating headscale container")
|
||||||
if pheadscale, err := s.pool.BuildAndRunWithBuildOptions(headscaleBuildOptions, headscaleOptions, DockerRestartPolicy); err == nil {
|
if pheadscale, err := s.pool.BuildAndRunWithBuildOptions(headscaleBuildOptions, headscaleOptions, DockerRestartPolicy); err == nil {
|
||||||
s.headscale = *pheadscale
|
s.headscale = *pheadscale
|
||||||
|
|
Loading…
Reference in a new issue