@@ -19,12 +19,13 @@ import (
19
19
20
20
func TestOperatorResolver (t * testing.T ) {
21
21
22
- testEntityCache := map [deppy.Identifier ]input.Entity {"operatorhub/prometheus/0.37.0" : * input .NewEntity ("operatorhub/prometheus/0.37.0" , map [string ]string {
23
- "olm.bundle.path" : `"quay.io/operatorhubio/prometheus@sha256:3e281e587de3d03011440685fc4fb782672beab044c1ebadc42788ce05a21c35"` ,
24
- "olm.channel" : "{\" channelName\" :\" beta\" ,\" priority\" :0,\" replaces\" :\" prometheusoperator.0.32.0\" }" ,
25
- "olm.gvk" : "[{\" group\" :\" monitoring.coreos.com\" ,\" kind\" :\" Alertmanager\" ,\" version\" :\" v1\" }, {\" group\" :\" monitoring.coreos.com\" ,\" kind\" :\" Prometheus\" ,\" version\" :\" v1\" }]" ,
26
- "olm.package" : "{\" packageName\" :\" prometheus\" ,\" version\" :\" 0.37.0\" }" ,
27
- }),
22
+ testEntityCache := map [deppy.Identifier ]input.Entity {"operatorhub/prometheus/0.37.0" : * input .NewEntity (
23
+ "operatorhub/prometheus/0.37.0" , map [string ]string {
24
+ "olm.bundle.path" : `"quay.io/operatorhubio/prometheus@sha256:3e281e587de3d03011440685fc4fb782672beab044c1ebadc42788ce05a21c35"` ,
25
+ "olm.channel" : "{\" channelName\" :\" beta\" ,\" priority\" :0,\" replaces\" :\" prometheusoperator.0.32.0\" }" ,
26
+ "olm.gvk" : "[{\" group\" :\" monitoring.coreos.com\" ,\" kind\" :\" Alertmanager\" ,\" version\" :\" v1\" }, {\" group\" :\" monitoring.coreos.com\" ,\" kind\" :\" Prometheus\" ,\" version\" :\" v1\" }]" ,
27
+ "olm.package" : "{\" packageName\" :\" prometheus\" ,\" version\" :\" 0.37.0\" }" ,
28
+ }),
28
29
"operatorhub/prometheus/0.47.0" : * input .NewEntity ("operatorhub/prometheus/0.47.0" , map [string ]string {
29
30
"olm.bundle.path" : `"quay.io/operatorhubio/prometheus@sha256:5b04c49d8d3eff6a338b56ec90bdf491d501fe301c9cdfb740e5bff6769a21ed"` ,
30
31
"olm.channel" : "{\" channelName\" :\" beta\" ,\" priority\" :0,\" replaces\" :\" prometheusoperator.0.37.0\" }" ,
@@ -103,7 +104,7 @@ func TestOperatorResolver(t *testing.T) {
103
104
resolver := resolution .NewOperatorResolver (client , entitySource )
104
105
solution , err := resolver .Resolve (context .Background ())
105
106
106
- if err != nil {
107
+ if tt . ExpectedError != nil {
107
108
assert .Equal (t , err , tt .ExpectedError )
108
109
assert .Nil (t , solution )
109
110
} else {
0 commit comments