Skip to content

Commit

Permalink
getting rid of old dos games references
Browse files Browse the repository at this point in the history
Signed-off-by: Austin Abro <[email protected]>
  • Loading branch information
AustinAbro321 committed Aug 6, 2024
1 parent 7fc58c9 commit eac1d2c
Show file tree
Hide file tree
Showing 10 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion examples/composable-packages/zarf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ components:
# default: false # the initial value overrides the child component
import:
# The URL to the skeleton package containing this component's package definition
url: oci://🦄/dos-games:1.0.0
url: oci://ghcr.io/zarf-dev/dos-games:1.0.0
# Example optional custom name to point to in the imported package (default is to use this component's name)
name: baseline
# Un'name'd Zarf primitives will be appended to the end of the primitive's list for that component.
Expand Down
12 changes: 6 additions & 6 deletions src/test/e2e/06_create_sbom_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,26 +24,26 @@ func TestCreateSBOM(t *testing.T) {
require.NoError(t, err, stdOut, stdErr)
require.Contains(t, stdErr, "Creating SBOMs for 1 images and 0 components with files.")
// Test that the game package generates the SBOMs we expect (images only)
require.FileExists(t, filepath.Join(sbomPath, "dos-games", "sbom-viewer-docker.io_defenseunicorns_zarf-game_multi-tile-dark.html"))
require.FileExists(t, filepath.Join(sbomPath, "dos-games", "sbom-viewer-docker.io_defenseunicorns_zarf-game_0.0.1.html"))
require.FileExists(t, filepath.Join(sbomPath, "dos-games", "compare.html"))
require.FileExists(t, filepath.Join(sbomPath, "dos-games", "docker.io_defenseunicorns_zarf-game_multi-tile-dark.json"))
require.FileExists(t, filepath.Join(sbomPath, "dos-games", "docker.io_defenseunicorns_zarf-game_0.0.1.json"))

// Clean the SBOM path so it is force to be recreated
e2e.CleanFiles(sbomPath)

stdOut, stdErr, err = e2e.Zarf(t, "package", "inspect", pkgName, "--sbom-out", sbomPath)
require.NoError(t, err, stdOut, stdErr)
// Test that the game package generates the SBOMs we expect (images only)
_, err = os.ReadFile(filepath.Join(sbomPath, "dos-games", "sbom-viewer-docker.io_defenseunicorns_zarf-game_multi-tile-dark.html"))
_, err = os.ReadFile(filepath.Join(sbomPath, "dos-games", "sbom-viewer-docker.io_defenseunicorns_zarf-game_0.0.1.html"))
require.NoError(t, err)
_, err = os.ReadFile(filepath.Join(sbomPath, "dos-games", "compare.html"))
require.NoError(t, err)
_, err = os.ReadFile(filepath.Join(sbomPath, "dos-games", "docker.io_defenseunicorns_zarf-game_multi-tile-dark.json"))
_, err = os.ReadFile(filepath.Join(sbomPath, "dos-games", "docker.io_defenseunicorns_zarf-game_0.0.1.json"))
require.NoError(t, err)

stdOut, _, err = e2e.Zarf(t, "package", "inspect", pkgName, "--list-images")
require.NoError(t, err)
require.Equal(t, "- defenseunicorns/zarf-game:multi-tile-dark\n", stdOut)
require.Equal(t, "- defenseunicorns/zarf-game:0.0.1\n", stdOut)

// Pull the current zarf binary version to find the corresponding init package
version, stdErr, err := e2e.Zarf(t, "version")
Expand All @@ -54,7 +54,7 @@ func TestCreateSBOM(t *testing.T) {
stdOut, stdErr, err = e2e.Zarf(t, "package", "inspect", initName, "--sbom-out", sbomPath)
require.NoError(t, err, stdOut, stdErr)
// Test that we preserve the filepath
_, err = os.ReadFile(filepath.Join(sbomPath, "dos-games", "sbom-viewer-docker.io_defenseunicorns_zarf-game_multi-tile-dark.html"))
_, err = os.ReadFile(filepath.Join(sbomPath, "dos-games", "sbom-viewer-docker.io_defenseunicorns_zarf-game_0.0.1.html"))
require.NoError(t, err)
// Test that the init package generates the SBOMs we expect (images + component files)
_, err = os.ReadFile(filepath.Join(sbomPath, "init", "sbom-viewer-docker.io_gitea_gitea_1.21.5-rootless.html"))
Expand Down
2 changes: 1 addition & 1 deletion src/test/e2e/09_component_compose_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ func (suite *CompositionSuite) Test_0_ComposabilityExample() {

// Ensure that the action was appended
suite.Contains(stdErr, `
- defenseunicorns/zarf-game:multi-tile-dark
- defenseunicorns/zarf-game:0.0.1
actions:
onDeploy:
before:
Expand Down
2 changes: 1 addition & 1 deletion src/test/e2e/12_lint_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func TestLint(t *testing.T) {
// Testing import / compose + variables are working
require.Contains(t, strippedStderr, ".components.[2].images.[3] | Image not pinned with digest - busybox:latest")
// Testing OCI imports get linted
require.Contains(t, strippedStderr, ".components.[0].images.[0] | Image not pinned with digest - defenseunicorns/zarf-game:multi-tile-dark")
require.Contains(t, strippedStderr, ".components.[0].images.[0] | Image not pinned with digest - defenseunicorns/zarf-game:0.0.1")

// Check flavors
require.NotContains(t, strippedStderr, "image-in-bad-flavor-component:unpinned")
Expand Down
2 changes: 1 addition & 1 deletion src/test/packages/12-lint/linted-import/zarf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ components:

- name: oci-games-url
import:
url: oci://🦄/dos-games:1.0.0
url: oci://ghcr.io/zarf-dev/dos-games:1.0.0
name: baseline
2 changes: 1 addition & 1 deletion src/test/packages/12-lint/zarf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ components:

- name: oci-games-url
import:
url: oci://🦄/dos-games:1.0.0
url: oci://ghcr.io/zarf-dev/dos-games:1.0.0
name: baseline

- name: oci-games-url
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ spec:
spec:
containers:
- name: multi-game
image: "defenseunicorns/zarf-game:multi-tile-dark"
image: "ghcr.io/zarf-dev/zarf-game:0.0.1"
ports:
- name: http
containerPort: 8000
Expand Down
2 changes: 1 addition & 1 deletion src/test/packages/25-evil-dos-games/zarf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ components:
- manifests/evil-deployment.yaml
- manifests/service.yaml
images:
- defenseunicorns/zarf-game:multi-tile-dark
- defenseunicorns/zarf-game:0.0.1
2 changes: 1 addition & 1 deletion src/test/packages/25-manifest-adoption/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ spec:
spec:
containers:
- name: multi-game
image: "defenseunicorns/zarf-game:multi-tile-dark"
image: "ghcr.io/zarf-dev/zarf-game:0.0.1"
ports:
- name: http
containerPort: 8000
Expand Down
6 changes: 3 additions & 3 deletions src/test/packages/26-image-dos-games/zarf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ components:
- name: baseline
required: true
images:
- defenseunicorns/zarf-game:multi-tile-dark
- defenseunicorns/zarf-game:multi-tile-dark@sha256:f78e442f0f3eb3e9459b5ae6b1a8fda62f8dfe818112e7d130a4e8ae72b3cbff
- defenseunicorns/zarf-game@sha256:f78e442f0f3eb3e9459b5ae6b1a8fda62f8dfe818112e7d130a4e8ae72b3cbff
- ghcr.io/zarf-dev/zarf-game:0.0.1
- ghcr.io/zarf-dev/zarf-game:0.0.1@sha256:0a44b759e219d9d6f3c7cbbf40c57ede71a1f9bf54da65767c4137be74727662
- ghcr.io/zarf-dev/zarf-game@sha256:0a44b759e219d9d6f3c7cbbf40c57ede71a1f9bf54da65767c4137be74727662

0 comments on commit eac1d2c

Please sign in to comment.