mirror of
https://gitea.com/gitea/runner.git
synced 2026-11-12 10:54:09 +00:00
test: expect the slash form of the CA path on Windows
HostEnvironment.GetActPath converts backslashes to slashes on Windows, so NODE_EXTRA_CA_CERTS points at the slash form of the temp dir and the assertion against the raw path failed there. Assisted-by: Claude Code:claude-opus-5-5
This commit is contained in:
1 file changed
+1
-1
@@ -1490,7 +1490,7 @@ func TestCopyWorkflowFilesHandsNodeTheRunnerCAUnlessTheJobOrImageSetsIt(t *testi
|
|||||||
return env
|
return env
|
||||||
}
|
}
|
||||||
|
|
||||||
assert.Equal(t, actPath+"/ca.crt", stepEnv(caFile, nil, nil, nil)["NODE_EXTRA_CA_CERTS"])
|
assert.Equal(t, filepath.ToSlash(actPath)+"/ca.crt", stepEnv(caFile, nil, nil, nil)["NODE_EXTRA_CA_CERTS"])
|
||||||
ca, err := os.ReadFile(filepath.Join(actPath, "ca.crt"))
|
ca, err := os.ReadFile(filepath.Join(actPath, "ca.crt"))
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
assert.Equal(t, "PEM\n", string(ca))
|
assert.Equal(t, "PEM\n", string(ca))
|
||||||
|
|||||||
Reference in new issue
Block a user