mirror of
https://gitea.com/gitea/act_runner.git
synced 2026-11-05 23:00:33 +08: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:
@@ -1490,7 +1490,7 @@ func TestCopyWorkflowFilesHandsNodeTheRunnerCAUnlessTheJobOrImageSetsIt(t *testi
|
||||
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"))
|
||||
require.NoError(t, err)
|
||||
assert.Equal(t, "PEM\n", string(ca))
|
||||
|
||||
Reference in New Issue
Block a user