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()
|
||||
|
||||
Expect(ids).To(Equal([]string{"9164d667"}))
|
||||
Expect(ids).To(Equal([]string{"b536b2bd"}))
|
||||
|
||||
})
|
||||
It("Find packages", func() {
|
||||
|
@@ -87,11 +87,11 @@ func DefaultPackageFromYaml(source []byte) (DefaultPackage, error) {
|
||||
|
||||
// DefaultPackage represent a standard package definition
|
||||
type DefaultPackage struct {
|
||||
ID int `storm:"id,increment"` // primary key with auto increment
|
||||
Name string `json:"name"` // Affects YAML field names too.
|
||||
Version string `json:"version"` // Affects YAML field names too.
|
||||
Category string `json:"category"` // Affects YAML field names too.
|
||||
UseFlags []string `json:"use_flags"` // Affects YAML field names too.
|
||||
ID int `json:"-" storm:"id,increment"` // primary key with auto increment
|
||||
Name string `json:"name"` // Affects YAML field names too.
|
||||
Version string `json:"version"` // Affects YAML field names too.
|
||||
Category string `json:"category"` // Affects YAML field names too.
|
||||
UseFlags []string `json:"use_flags"` // Affects YAML field names too.
|
||||
State State
|
||||
PackageRequires []*DefaultPackage `json:"requires"` // 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()
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
Expect(len(f)).To(Equal(2))
|
||||
Expect(f[0].String()).To(Equal("or(not(3dabcd83), dc3841f5)"))
|
||||
Expect(f[1].String()).To(Equal("or(not(3dabcd83), not(5f881536))"))
|
||||
Expect(f[0].String()).To(Equal("or(not(c31f5842), a4910f77)"))
|
||||
Expect(f[1].String()).To(Equal("or(not(c31f5842), not(a97670be))"))
|
||||
})
|
||||
})
|
||||
|
||||
|
Reference in New Issue
Block a user