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>
This commit is contained in:
Sunny 2023-01-17 21:29:15 +00:00
parent 8785ebc9ae
commit baaa412779
1 changed files with 2 additions and 0 deletions

View File

@ -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-",