-
Notifications
You must be signed in to change notification settings - Fork 30
WIP OPRUN-4054: [OTE] add catalog tests from openshift/origin #419
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,104 @@ | ||
[ | ||
{ | ||
"name": "[sig-olmv1][OCPFeatureGate:NewOLM][Skipped:Disconnected] OLMv1 Catalogs should be installed", | ||
"labels": {}, | ||
"resources": { | ||
"isolation": {} | ||
}, | ||
"source": "openshift:payload:olmv1", | ||
"lifecycle": "blocking", | ||
"environmentSelector": {} | ||
}, | ||
{ | ||
"name": "[sig-olmv1][OCPFeatureGate:NewOLM][Skipped:Disconnected] OLMv1 openshift-community-operators Catalog should serve FBC via the /v1/api/all endpoint", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
"labels": {}, | ||
"resources": { | ||
"isolation": {} | ||
}, | ||
"source": "openshift:payload:olmv1", | ||
"lifecycle": "blocking", | ||
"environmentSelector": {} | ||
}, | ||
{ | ||
"name": "[sig-olmv1][OCPFeatureGate:NewOLM][Skipped:Disconnected] OLMv1 openshift-certified-operators Catalog should serve FBC via the /v1/api/all endpoint", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
"labels": {}, | ||
"resources": { | ||
"isolation": {} | ||
}, | ||
"source": "openshift:payload:olmv1", | ||
"lifecycle": "blocking", | ||
"environmentSelector": {} | ||
}, | ||
{ | ||
"name": "[sig-olmv1][OCPFeatureGate:NewOLM][Skipped:Disconnected] OLMv1 openshift-redhat-marketplace Catalog should serve FBC via the /v1/api/all endpoint", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
"labels": {}, | ||
"resources": { | ||
"isolation": {} | ||
}, | ||
"source": "openshift:payload:olmv1", | ||
"lifecycle": "blocking", | ||
"environmentSelector": {} | ||
}, | ||
{ | ||
"name": "[sig-olmv1][OCPFeatureGate:NewOLM][Skipped:Disconnected] OLMv1 openshift-redhat-operators Catalog should serve FBC via the /v1/api/all endpoint", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
"labels": {}, | ||
"resources": { | ||
"isolation": {} | ||
}, | ||
"source": "openshift:payload:olmv1", | ||
"lifecycle": "blocking", | ||
"environmentSelector": {} | ||
}, | ||
{ | ||
"name": "[sig-olmv1][OCPFeatureGate:NewOLMCatalogdAPIV1Metas][Skipped:Disconnected] OLMv1 openshift-community-operators Catalog should serve FBC via the /v1/api/metas endpoint", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
"labels": {}, | ||
"resources": { | ||
"isolation": {} | ||
}, | ||
"source": "openshift:payload:olmv1", | ||
"lifecycle": "blocking", | ||
"environmentSelector": {} | ||
}, | ||
{ | ||
"name": "[sig-olmv1][OCPFeatureGate:NewOLMCatalogdAPIV1Metas][Skipped:Disconnected] OLMv1 openshift-certified-operators Catalog should serve FBC via the /v1/api/metas endpoint", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
"labels": {}, | ||
"resources": { | ||
"isolation": {} | ||
}, | ||
"source": "openshift:payload:olmv1", | ||
"lifecycle": "blocking", | ||
"environmentSelector": {} | ||
}, | ||
{ | ||
"name": "[sig-olmv1][OCPFeatureGate:NewOLMCatalogdAPIV1Metas][Skipped:Disconnected] OLMv1 openshift-redhat-marketplace Catalog should serve FBC via the /v1/api/metas endpoint", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
"labels": {}, | ||
"resources": { | ||
"isolation": {} | ||
}, | ||
"source": "openshift:payload:olmv1", | ||
"lifecycle": "blocking", | ||
"environmentSelector": {} | ||
}, | ||
{ | ||
"name": "[sig-olmv1][OCPFeatureGate:NewOLMCatalogdAPIV1Metas][Skipped:Disconnected] OLMv1 openshift-redhat-operators Catalog should serve FBC via the /v1/api/metas endpoint", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
"labels": {}, | ||
"resources": { | ||
"isolation": {} | ||
}, | ||
"source": "openshift:payload:olmv1", | ||
"lifecycle": "blocking", | ||
"environmentSelector": {} | ||
}, | ||
{ | ||
"name": "[sig-olmv1][OCPFeatureGate:NewOLM][Skipped:Disconnected] OLMv1 New Catalog Install should fail to install if it has an invalid reference", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
"labels": {}, | ||
"resources": { | ||
"isolation": {} | ||
}, | ||
"source": "openshift:payload:olmv1", | ||
"lifecycle": "blocking", | ||
"environmentSelector": {} | ||
}, | ||
{ | ||
"name": "[sig-olmv1] OLMv1 should pass a trivial sanity check", | ||
"labels": {}, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
package helpers | ||
|
||
import ( | ||
"context" | ||
"fmt" | ||
|
||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | ||
|
||
olmv1 "github.com/operator-framework/operator-controller/api/v1" | ||
|
||
"github/operator-framework-operator-controller/openshift/tests-extension/pkg/env" | ||
) | ||
|
||
// CreateClusterCatalog creates a ClusterCatalog with the specified name and image reference | ||
// Returns a cleanup function to delete the catalog after use. | ||
func CreateClusterCatalog(ctx context.Context, name, imageRef string) (func(), error) { | ||
k8sClient := env.Get().K8sClient | ||
|
||
catalog := &olmv1.ClusterCatalog{ | ||
ObjectMeta: metav1.ObjectMeta{ | ||
Name: name, | ||
}, | ||
Spec: olmv1.ClusterCatalogSpec{ | ||
Source: olmv1.CatalogSource{ | ||
Type: olmv1.SourceTypeImage, | ||
Image: &olmv1.ImageSource{ | ||
Ref: imageRef, | ||
}, | ||
}, | ||
}, | ||
} | ||
|
||
if err := k8sClient.Create(ctx, catalog); err != nil { | ||
return nil, fmt.Errorf("failed to create ClusterCatalog: %w", err) | ||
} | ||
|
||
return func() { | ||
_ = k8sClient.Delete(ctx, &olmv1.ClusterCatalog{ | ||
ObjectMeta: metav1.ObjectMeta{ | ||
Name: name, | ||
}, | ||
}) | ||
}, nil | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same name: https://github.com/openshift/origin/blob/7e8f07d709c533890f1c2f29fddea27fe4acffae/test/extended/util/annotate/generated/zz_generated.annotations.go#L1994