Skip to content

Commit

Permalink
client: Add base-commit-meta
Browse files Browse the repository at this point in the history
Needed for work in coreos-assembler.
  • Loading branch information
cgwalters committed Nov 18, 2023
1 parent 2722cfb commit 0fd47cc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ type Deployment struct {
RequestedPackages []string `json:"requested-packages"`
RequestedBaseRemovals []string `json:"requested-base-removals"`
Unlocked *string `json:"unlocked"`

BaseCommitMeta map[string]interface{} `json:"base-commit-meta"`
}

// Client is a handle for interacting with an rpm-ostree based system.
Expand Down
6 changes: 6 additions & 0 deletions pkg/client/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,12 @@ func TestParseFcosWithOverrides(t *testing.T) {

firstDeploy := s.Deployments[0]
assert.Equal(t, firstDeploy.RequestedBaseRemovals[0], "moby-engine")

stream, ok := s.Deployments[0].BaseCommitMeta["fedora-coreos.stream"]
if !ok {
t.Error("Missing stream")
}
assert.Equal(t, stream, "stable")
}

func TestParseDeploymentError(t *testing.T) {
Expand Down

0 comments on commit 0fd47cc

Please sign in to comment.