Skip to content

Commit

Permalink
delete sget test
Browse files Browse the repository at this point in the history
Signed-off-by: Austin Abro <[email protected]>
  • Loading branch information
AustinAbro321 committed Aug 22, 2024
1 parent f475dda commit c701d0a
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 22 deletions.
8 changes: 0 additions & 8 deletions src/pkg/utils/cosign.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,13 @@ import (
"context"
"fmt"
"io"
"os"
"strings"

"github.com/defenseunicorns/pkg/helpers/v2"
"github.com/google/go-containerregistry/pkg/authn"
"github.com/google/go-containerregistry/pkg/name"
"github.com/google/go-containerregistry/pkg/v1/remote"
"github.com/pkg/errors"
"github.com/zarf-dev/zarf/src/config"
"github.com/zarf-dev/zarf/src/config/lang"
"github.com/zarf-dev/zarf/src/pkg/message"

Expand All @@ -41,12 +39,6 @@ import (
func Sget(ctx context.Context, image, key string, out io.Writer) error {
message.Warnf(lang.WarnSGetDeprecation)

// If this is a DefenseUnicorns package, use an internal sget public key
if strings.HasPrefix(image, fmt.Sprintf("%s://defenseunicorns", helpers.SGETURLScheme)) {
os.Setenv("DU_SGET_KEY", config.CosignPublicKey)
key = "env://DU_SGET_KEY"
}

// Remove the custom protocol header from the url
image = strings.TrimPrefix(image, helpers.SGETURLPrefix)

Expand Down
14 changes: 0 additions & 14 deletions src/test/e2e/27_deploy_regression_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (
"testing"

"github.com/stretchr/testify/require"
"github.com/zarf-dev/zarf/src/pkg/utils/exec"
)

func TestGHCRDeploy(t *testing.T) {
Expand All @@ -31,16 +30,3 @@ func TestGHCRDeploy(t *testing.T) {
stdOut, stdErr, err = e2e.Zarf(t, "package", "remove", "dos-games", "--confirm")
require.NoError(t, err, stdOut, stdErr)
}

func TestCosignDeploy(t *testing.T) {
t.Log("E2E: Cosign deploy")

// Test with command from https://docs.zarf.dev/getting-started/install/
command := fmt.Sprintf("%s package deploy sget://defenseunicorns/zarf-hello-world:$(uname -m) --confirm", e2e.ZarfBinPath)

stdOut, stdErr, err := exec.CmdWithTesting(t, exec.PrintCfg(), "sh", "-c", command)
require.NoError(t, err, stdOut, stdErr)

stdOut, stdErr, err = e2e.Zarf(t, "package", "remove", "dos-games", "--confirm")
require.NoError(t, err, stdOut, stdErr)
}

0 comments on commit c701d0a

Please sign in to comment.