@@ -29,33 +29,34 @@ var _ = Describe("InstalledPackageVariableSource", func() {
29
29
30
30
mockEntitySource = input .NewCacheQuerier (map [deppy.Identifier ]input.Entity {
31
31
"test-package.v1.0.0" : * input .NewEntity ("test-package.v1.0.0test-packagestable" , map [string ]string {
32
- property .TypePackage : `{"packageName": "test-package", "version": "1.0.0"}` ,
33
- olmentity .
PropertyBundlePath :
`"registry.io/repo/[email protected] "` ,
34
- property .TypeChannel : `{"channelName":"stable","priority":0}` ,
32
+ property .TypePackage : `{"packageName": "test-package", "version": "1.0.0"}` ,
33
+ property .TypeChannel : `{"channelName":"stable","priority":0}` ,
34
+ olmentity .
PropertyBundlePath :
`"registry.io/repo/[email protected] "` ,
35
+ olmentity .PropertyBundleChannelEntry : `{"name": "test-package.v1.0.0"}` ,
35
36
}),
36
37
"test-package.v3.0.0" : * input .NewEntity ("test-package.v3.0.0test-packagestable" , map [string ]string {
37
- property .TypePackage : `{"packageName": "test-package", "version": "3.0.0"}` ,
38
- property .TypeChannel : `{"channelName":"stable","priority":0}` ,
39
- olmentity .
PropertyBundlePath :
`"registry.io/repo/[email protected] "` ,
40
- "olm.replaces" : `{ "replaces": "test-package.v2.0.0"}` ,
38
+ property .TypePackage : `{"packageName": "test-package", "version": "3.0.0"}` ,
39
+ property .TypeChannel : `{"channelName":"stable","priority":0}` ,
40
+ olmentity .
PropertyBundlePath :
`"registry.io/repo/[email protected] "` ,
41
+ olmentity . PropertyBundleChannelEntry : `{"name": "test-package.v3.0.0", "replaces": "test-package.v2.0.0"}` ,
41
42
}),
42
43
"test-package.v2.0.0" : * input .NewEntity ("test-package.v2.0.0test-packagestable" , map [string ]string {
43
- property .TypePackage : `{"packageName": "test-package", "version": "2.0.0"}` ,
44
- property .TypeChannel : `{"channelName":"stable","priority":0}` ,
45
- olmentity .
PropertyBundlePath :
`"registry.io/repo/[email protected] "` ,
46
- "olm.replaces" : `{ "replaces": "test-package.v1.0.0"}` ,
44
+ property .TypePackage : `{"packageName": "test-package", "version": "2.0.0"}` ,
45
+ property .TypeChannel : `{"channelName":"stable","priority":0}` ,
46
+ olmentity .
PropertyBundlePath :
`"registry.io/repo/[email protected] "` ,
47
+ olmentity . PropertyBundleChannelEntry : `{"name": "test-package.v2.0.0", "replaces": "test-package.v1.0.0"}` ,
47
48
}),
48
49
"test-package.4.0.0" : * input .NewEntity ("test-package.v4.0.0test-packagestable" , map [string ]string {
49
- property .TypePackage : `{"packageName": "test-package", "version": "4.0.0"}` ,
50
- property .TypeChannel : `{"channelName":"stable","priority":0}` ,
51
- olmentity .
PropertyBundlePath :
`"registry.io/repo/[email protected] "` ,
52
- "olm.replaces" : `{ "replaces": "test-package.v3.0.0"}` ,
50
+ property .TypePackage : `{"packageName": "test-package", "version": "4.0.0"}` ,
51
+ property .TypeChannel : `{"channelName":"stable","priority":0}` ,
52
+ olmentity .
PropertyBundlePath :
`"registry.io/repo/[email protected] "` ,
53
+ olmentity . PropertyBundleChannelEntry : `{"name": "test-package.v4.0.0", "replaces": "test-package.v3.0.0"}` ,
53
54
}),
54
55
"test-package.5.0.0" : * input .NewEntity ("test-package.v5.0.0test-packagestable" , map [string ]string {
55
- property .TypePackage : `{"packageName": "test-package", "version": "5-00"}` ,
56
- property .TypeChannel : `{"channelName":"stable","priority":0}` ,
57
- olmentity .
PropertyBundlePath :
`"registry.io/repo/[email protected] "` ,
58
- "olm.replaces" : `{ "replaces": "test-package.v4.0.0"}` ,
56
+ property .TypePackage : `{"packageName": "test-package", "version": "5-00"}` ,
57
+ property .TypeChannel : `{"channelName":"stable","priority":0}` ,
58
+ olmentity .
PropertyBundlePath :
`"registry.io/repo/[email protected] "` ,
59
+ olmentity . PropertyBundleChannelEntry : `{"name": "test-package.v5.0.0", "replaces": "test-package.v4.0.0"}` ,
59
60
}),
60
61
})
61
62
})
@@ -66,7 +67,7 @@ var _ = Describe("InstalledPackageVariableSource", func() {
66
67
Expect (variables ).To (HaveLen (1 ))
67
68
reqPackageVar , ok := variables [0 ].(* olmvariables.InstalledPackageVariable )
68
69
Expect (ok ).To (BeTrue ())
69
- Expect (reqPackageVar .Identifier ()).To (Equal (deppy .IdentifierFromString ("installed package test-package.v2.0.0 " )))
70
+ Expect (reqPackageVar .Identifier ()).To (Equal (deppy .IdentifierFromString ("installed package test-package" )))
70
71
71
72
// ensure bundle entities are in version order (high to low)
72
73
Expect (reqPackageVar .BundleEntities ()[0 ].ID ).To (Equal (deppy .IdentifierFromString ("test-package.v3.0.0test-packagestable" )))
0 commit comments