mirror of
https://github.com/juanfont/headscale.git
synced 2026-10-17 20:16:31 +09:00
ci: distribute the compiled integration test binary
This commit is contained in:
1 parent
bcc71f9b57
commit
c9852c43da
3 files changed
+16
-13
No files matched your search
@@ -289,6 +289,12 @@ func createTestContainer(ctx context.Context, cli *client.Client, config *RunCon
|
||||
},
|
||||
}
|
||||
|
||||
if config.TestBinary != "" {
|
||||
// A custom server image may have its own entrypoint; run the tests directly.
|
||||
containerConfig.Entrypoint = testCmd[:1]
|
||||
containerConfig.Cmd = testCmd[1:]
|
||||
}
|
||||
|
||||
// Get the correct Docker socket path from the current context
|
||||
dockerSocketPath := getDockerSocketPath()
|
||||
|
||||
|
||||
+3
-1
@@ -142,8 +142,10 @@ func TestCompiledTestContainer(t *testing.T) {
|
||||
|
||||
request := <-requests
|
||||
assert.Equal(t, "headscale:ci-test", request.Image)
|
||||
// A custom server image may already have a headscale entrypoint.
|
||||
assert.Equal(t, []string{"/integration.test"}, []string(request.Entrypoint))
|
||||
assert.Equal(t, []string{
|
||||
"/integration.test", "-test.run", config.TestPattern,
|
||||
"-test.run", config.TestPattern,
|
||||
"-test.failfast", "-test.timeout", "15m0s", "-test.v",
|
||||
}, []string(request.Cmd))
|
||||
assert.Contains(t, request.Env, "HEADSCALE_INTEGRATION_POSTGRES=1")
|
||||
|
||||
Reference in new issue
Block a user