Skip to content

Commit

Permalink
adjust test
Browse files Browse the repository at this point in the history
Signed-off-by: Austin Abro <[email protected]>
  • Loading branch information
AustinAbro321 committed Jan 17, 2025
1 parent 24cd738 commit 03bfffd
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 12 deletions.
2 changes: 2 additions & 0 deletions src/cmd/dev.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import (
"github.com/sergi/go-diff/diffmatchpatch"
"github.com/spf13/cobra"
"github.com/spf13/viper"
"github.com/zarf-dev/zarf/src/api/v1alpha1"
"github.com/zarf-dev/zarf/src/cmd/common"
"github.com/zarf-dev/zarf/src/config"
"github.com/zarf-dev/zarf/src/config/lang"
Expand Down Expand Up @@ -98,6 +99,7 @@ func (o *DevInspectDefinitionOptions) Run(cmd *cobra.Command, args []string) err
if err != nil {
return err
}
pkg.Build = v1alpha1.ZarfBuildData{}
err = utils.ColorPrintYAML(pkg, nil, false)
if err != nil {
return err
Expand Down
4 changes: 2 additions & 2 deletions src/test/e2e/00_use_cli_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ func TestUseCLI(t *testing.T) {
t.Parallel()
pathToPackage := filepath.Join("src", "test", "packages", "00-dev-inspect-definition")

stdout, _, err := e2e.Zarf(t, "dev", "inspect", "definition", pathToPackage, "--flavor=ice-cream", "--set=MY_VAR=worked-as-expected")
stdOut, _, err := e2e.Zarf(t, "dev", "inspect", "definition", pathToPackage, "--flavor=ice-cream", "--set=MY_VAR=worked-as-expected", "--architecture=amd64")
require.NoError(t, err)
b, err := os.ReadFile(filepath.Join(pathToPackage, "expected-zarf.yaml"))
require.NoError(t, err)
require.Contains(t, stdout, string(b))
require.Contains(t, stdOut, string(b))
})

t.Run("zarf prepare sha256sum <local>", func(t *testing.T) {
Expand Down
10 changes: 0 additions & 10 deletions src/test/packages/00-dev-inspect-definition/expected-zarf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,6 @@ kind: ZarfPackageConfig
metadata:
name: test-inspect-definition
architecture: amd64
build:
terminal: ""
user: ""
architecture: ""
timestamp: ""
version: ""
migrations:
- scripts-to-actions
- pluralize-set-variable
lastNonBreakingVersion: v0.27.0
components:
- name: import-test
description: worked-fine
Expand Down

0 comments on commit 03bfffd

Please sign in to comment.