Skip to content

Commit baaa412

Browse files
committed
Fix ocirepo testdata permissions
On Ubuntu, and maybe some others, the `TestOCIRepository_reconcileArtifact` test fails due to difference in file permission, which results in different artifact checksum. This is due to the default umask on ubuntu. Reset the permission of the testdata to fix the test on ubuntu. There's a similar fix in `TestGitRepositoryReconciler_reconcileArtifact` test. Signed-off-by: Sunny <darkowlzz@protonmail.com>
1 parent 8785ebc commit baaa412

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

controllers/ocirepository_controller_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1637,6 +1637,8 @@ func TestOCIRepository_reconcileArtifact(t *testing.T) {
16371637
t.Run(tt.name, func(t *testing.T) {
16381638
g := NewWithT(t)
16391639

1640+
resetChmod(tt.targetPath, 0o755, 0o644)
1641+
16401642
obj := &sourcev1.OCIRepository{
16411643
ObjectMeta: metav1.ObjectMeta{
16421644
GenerateName: "reconcile-artifact-",

0 commit comments

Comments
 (0)