mirror of
https://github.com/mudler/luet.git
synced 2025-09-02 15:54:39 +00:00
Drop ID from marshalled content
This commit is contained in:
@@ -45,7 +45,7 @@ var _ = Describe("Database", func() {
|
|||||||
|
|
||||||
ids := db.GetPackages()
|
ids := db.GetPackages()
|
||||||
|
|
||||||
Expect(ids).To(Equal([]string{"9164d667"}))
|
Expect(ids).To(Equal([]string{"b536b2bd"}))
|
||||||
|
|
||||||
})
|
})
|
||||||
It("Find packages", func() {
|
It("Find packages", func() {
|
||||||
|
@@ -87,11 +87,11 @@ func DefaultPackageFromYaml(source []byte) (DefaultPackage, error) {
|
|||||||
|
|
||||||
// DefaultPackage represent a standard package definition
|
// DefaultPackage represent a standard package definition
|
||||||
type DefaultPackage struct {
|
type DefaultPackage struct {
|
||||||
ID int `storm:"id,increment"` // primary key with auto increment
|
ID int `json:"-" storm:"id,increment"` // primary key with auto increment
|
||||||
Name string `json:"name"` // Affects YAML field names too.
|
Name string `json:"name"` // Affects YAML field names too.
|
||||||
Version string `json:"version"` // Affects YAML field names too.
|
Version string `json:"version"` // Affects YAML field names too.
|
||||||
Category string `json:"category"` // Affects YAML field names too.
|
Category string `json:"category"` // Affects YAML field names too.
|
||||||
UseFlags []string `json:"use_flags"` // Affects YAML field names too.
|
UseFlags []string `json:"use_flags"` // Affects YAML field names too.
|
||||||
State State
|
State State
|
||||||
PackageRequires []*DefaultPackage `json:"requires"` // Affects YAML field names too.
|
PackageRequires []*DefaultPackage `json:"requires"` // Affects YAML field names too.
|
||||||
PackageConflicts []*DefaultPackage `json:"conflicts"` // Affects YAML field names too.
|
PackageConflicts []*DefaultPackage `json:"conflicts"` // Affects YAML field names too.
|
||||||
|
@@ -94,8 +94,8 @@ var _ = Describe("Package", func() {
|
|||||||
f, err := a1.BuildFormula()
|
f, err := a1.BuildFormula()
|
||||||
Expect(err).ToNot(HaveOccurred())
|
Expect(err).ToNot(HaveOccurred())
|
||||||
Expect(len(f)).To(Equal(2))
|
Expect(len(f)).To(Equal(2))
|
||||||
Expect(f[0].String()).To(Equal("or(not(3dabcd83), dc3841f5)"))
|
Expect(f[0].String()).To(Equal("or(not(c31f5842), a4910f77)"))
|
||||||
Expect(f[1].String()).To(Equal("or(not(3dabcd83), not(5f881536))"))
|
Expect(f[1].String()).To(Equal("or(not(c31f5842), not(a97670be))"))
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user