Skip to content

Commit 8868e38

Browse files
Merge pull request #32 from jhadvig/OCPBUGS-56830
OCPBUGS-56830: Add required fields to the CronTab CRD
2 parents 129c30f + 2c27786 commit 8868e38

3 files changed

Lines changed: 19 additions & 2 deletions

File tree

charts/console-crontab-plugin/templates/crontab-crd.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,26 @@ spec:
1616
schema:
1717
openAPIV3Schema:
1818
type: object
19+
required:
20+
- apiVersion
21+
- kind
22+
- metadata
23+
- spec
1924
properties:
25+
apiVersion:
26+
description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
27+
type: string
28+
kind:
29+
description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
30+
type: string
31+
metadata:
32+
type: object
2033
spec:
2134
type: object
35+
required:
36+
- cronSpec
37+
- image
38+
- replicas
2239
properties:
2340
cronSpec:
2441
type: string

integration-tests/e2e/crud.cy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ describe(`${PLUGIN_NAME}`, () => {
4848
nav.sidenav.clickNavLink(["Workloads", "CronTabs"]);
4949
common.resourceTitleShouldHaveText("CronTabs");
5050
listPage.clickCreateYAMLbutton();
51-
cy.byLegacyTestID("resource-title").should("contain", "Create CronTab");
51+
cy.get('[data-test="page-heading"] h1').should("contain", "Create CronTab");
5252
cy.byTestID("save-changes").click();
5353
common.inlineDangerAlert().should("not.exist");
5454
common.resourceTitleShouldHaveText(cronTabName);

integration-tests/views/common.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,5 +70,5 @@ export const teardown = () => {
7070
export const common = {
7171
inlineDangerAlert: () => cy.get(".pf-c-alert.pf-m-inline.pf-m-danger"),
7272
resourceTitleShouldHaveText: (title: string) =>
73-
cy.byLegacyTestID("resource-title").should("have.text", title),
73+
cy.get('[data-test="page-heading"] h1').contains(title).should("exist"),
7474
};

0 commit comments

Comments
 (0)