From baaa412779759422ec5ac27e0a5a1c49f612e252 Mon Sep 17 00:00:00 2001 From: Sunny Date: Tue, 17 Jan 2023 21:29:15 +0000 Subject: [PATCH] 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 --- controllers/ocirepository_controller_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/controllers/ocirepository_controller_test.go b/controllers/ocirepository_controller_test.go index 0abd1648..c8d55919 100644 --- a/controllers/ocirepository_controller_test.go +++ b/controllers/ocirepository_controller_test.go @@ -1637,6 +1637,8 @@ func TestOCIRepository_reconcileArtifact(t *testing.T) { t.Run(tt.name, func(t *testing.T) { g := NewWithT(t) + resetChmod(tt.targetPath, 0o755, 0o644) + obj := &sourcev1.OCIRepository{ ObjectMeta: metav1.ObjectMeta{ GenerateName: "reconcile-artifact-",