Skip to content

Commit 68603d9

Browse files
committed
copy plan files too
1 parent 4cefbeb commit 68603d9

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

e2etest/declarativeScenario.go

+4
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ func (s *scenario) Run() {
7878
}
7979
azcopyRan := false
8080
defer func() {
81+
os.MkdirAll(os.Getenv("AZCOPY_E2E_LOG_OUTPUT"), os.ModePerm|os.ModeDir)
8182
if azcopyRan {
8283
s.uploadLogs(logDir)
8384
s.a.(*testingAsserter).t.Log("uploaded logs for job " + s.state.result.jobID.String() + " to container azcopylogs in account " + os.Getenv("AZCOPY_E2E_ACCOUNT_NAME"))
@@ -143,6 +144,9 @@ func (s *scenario) Run() {
143144
}
144145

145146
func (s *scenario) uploadLogs(logDir string) {
147+
if s.state.result == nil {
148+
return // nothing to upload
149+
}
146150
s.a.Assert(os.Rename(logDir, filepath.Join(os.Getenv("AZCOPY_E2E_LOG_OUTPUT"), s.state.result.jobID.String())), equals(), nil)
147151
}
148152

e2etest/runner.go

+2
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ import (
2626
"fmt"
2727
"os"
2828
"os/exec"
29+
"path/filepath"
2930
"strconv"
3031
"strings"
3132

@@ -236,6 +237,7 @@ func (t *TestRunner) ExecuteAzCopyCommand(operation Operation, src, dst string,
236237

237238
if logDir != "" {
238239
env = append(env, "AZCOPY_LOG_LOCATION="+logDir)
240+
env = append(env, "AZCOPY_JOB_PLAN_LOCATION="+filepath.Join(logDir, "plans"))
239241
}
240242

241243
out, err := t.execDebuggableWithOutput(GlobalInputManager{}.GetExecutablePath(), args, env, afterStart, chToStdin)

0 commit comments

Comments
 (0)