fix legacy code

parent 311edfa0
This diff is collapsed.
...@@ -42,10 +42,9 @@ import ( ...@@ -42,10 +42,9 @@ import (
func TestRewriteHardwareKeys(t *testing.T) { func TestRewriteHardwareKeys(t *testing.T) {
ctx := &types.Context{} ctx := &types.Context{}
packages := &cores.Packages{} packages := cores.Packages{}
packages.Packages = map[string]*cores.Package{}
aPackage := &cores.Package{Name: "dummy"} aPackage := &cores.Package{Name: "dummy"}
packages.Packages["dummy"] = aPackage packages["dummy"] = aPackage
aPackage.Platforms = map[string]*cores.Platform{} aPackage.Platforms = map[string]*cores.Platform{}
platform := &cores.PlatformRelease{ platform := &cores.PlatformRelease{
...@@ -83,10 +82,9 @@ func TestRewriteHardwareKeys(t *testing.T) { ...@@ -83,10 +82,9 @@ func TestRewriteHardwareKeys(t *testing.T) {
func TestRewriteHardwareKeysWithRewritingDisabled(t *testing.T) { func TestRewriteHardwareKeysWithRewritingDisabled(t *testing.T) {
ctx := &types.Context{} ctx := &types.Context{}
packages := &cores.Packages{} packages := cores.Packages{}
packages.Packages = make(map[string]*cores.Package)
aPackage := &cores.Package{Name: "dummy"} aPackage := &cores.Package{Name: "dummy"}
packages.Packages["dummy"] = aPackage packages["dummy"] = aPackage
aPackage.Platforms = make(map[string]*cores.Platform) aPackage.Platforms = make(map[string]*cores.Platform)
platform := &cores.PlatformRelease{ platform := &cores.PlatformRelease{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment