Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some debian test fixes #24861

Merged
merged 4 commits into from
Dec 19, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
test/system: CopyDirectory() do not chown files
If the source dir is owned by another user then the test the chown will
fail assuming we run the tests rootless. This function is only used by
the quadlet tests and for the purpose all we need is to read the files
so the simple fix is remove the chown as this should make the tests pass
on the special debian gating env.

Fixes #24802

Signed-off-by: Paul Holzinger <git@holzinger.dev>
Luap99 committed Dec 17, 2024
commit 23d4908c8bda1e4d86d6c799c51ff9ffc3374337
10 changes: 0 additions & 10 deletions test/e2e/common_test.go
Original file line number Diff line number Diff line change
@@ -20,7 +20,6 @@ import (
"strconv"
"strings"
"sync"
"syscall"
"testing"
"time"

@@ -1469,11 +1468,6 @@ func CopyDirectory(srcDir, dest string) error {
return err
}

stat, ok := fileInfo.Sys().(*syscall.Stat_t)
if !ok {
return fmt.Errorf("failed to get raw syscall.Stat_t data for %q", sourcePath)
}

switch fileInfo.Mode() & os.ModeType {
case os.ModeDir:
if err := os.MkdirAll(destPath, 0755); err != nil {
@@ -1492,10 +1486,6 @@ func CopyDirectory(srcDir, dest string) error {
}
}

if err := os.Lchown(destPath, int(stat.Uid), int(stat.Gid)); err != nil {
return err
}

fInfo, err := entry.Info()
if err != nil {
return err