-
Notifications
You must be signed in to change notification settings - Fork 163
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes for manifest with symlink (#2256)
## Description Fixes the issue with symlinks inside of manifests, similar to that seen in the [Big Bang Keycloak Helm Chart](https://repo1.dso.mil/big-bang/product/packages/keycloak/-/blob/main/development/theme-custom/theme/custom-theme/account/resources?ref_type=heads). ## Related Issue Fixes #2255 ## Type of change - [x] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Other (security config, docs update, etc) ## Checklist before merging - [x] Test, docs, adr added or updated as needed - [x] [Contributor Guide Steps](https://github.com/defenseunicorns/zarf/blob/main/CONTRIBUTING.md#developer-workflow) followed --------- Co-authored-by: razzle <harry@razzle.cloud> Co-authored-by: Wayne Starr <Racer159@users.noreply.github.com>
- Loading branch information
1 parent
7da5629
commit 00b3d76
Showing
6 changed files
with
86 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// SPDX-FileCopyrightText: 2021-Present The Zarf Authors | ||
|
||
// Package test provides e2e tests for Zarf. | ||
package test | ||
|
||
import ( | ||
"fmt" | ||
"path/filepath" | ||
"testing" | ||
|
||
"github.com/stretchr/testify/require" | ||
) | ||
|
||
func TestManifestWithSymlink(t *testing.T) { | ||
t.Log("E2E: Manifest With Symlink") | ||
tmpdir := t.TempDir() | ||
cachePath := filepath.Join(tmpdir, ".cache-location") | ||
|
||
// Build the package, should succeed, even though there is a symlink in the package. | ||
buildPath := filepath.Join("src", "test", "packages", "34-manifest-with-symlink") | ||
stdOut, stdErr, err := e2e.Zarf("package", "create", buildPath, "--zarf-cache", cachePath, "-o=build", "--confirm") | ||
require.NoError(t, err, stdOut, stdErr) | ||
|
||
path := fmt.Sprintf("build/zarf-package-manifest-with-symlink-%s-0.0.1.tar.zst", e2e.Arch) | ||
require.FileExists(t, path) | ||
defer e2e.CleanFiles(path) | ||
|
||
stdOut, stdErr, err = e2e.Zarf("package", "deploy", path, "--zarf-cache", cachePath, "--confirm") | ||
defer e2e.CleanFiles("temp/manifests") | ||
require.NoError(t, err, stdOut, stdErr) | ||
require.FileExists(t, "temp/manifests/resources/img", "Symlink does not exist in the package as expected.") | ||
} |
1 change: 1 addition & 0 deletions
1
src/test/packages/34-manifest-with-symlink/manifests/img/test.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|