Skip to content

Commit

Permalink
Improve e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
PBundyra committed Nov 22, 2023
1 parent 4a5f16f commit 8e2fad8
Show file tree
Hide file tree
Showing 33 changed files with 1,328 additions and 631 deletions.
1 change: 0 additions & 1 deletion apis/visibility/v1alpha1/conversion_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import (
"testing"

"github.com/google/go-cmp/cmp"

"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/util/diff"

Expand Down
225 changes: 158 additions & 67 deletions apis/visibility/v1alpha1/openapi/zz_generated.openapi.go

Large diffs are not rendered by default.

40 changes: 30 additions & 10 deletions apis/visibility/v1alpha1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,12 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

/*
This file is needed for kubernetes/code-generator/kube_codegen.sh script used in hack/update-codegen.sh.
*/

package v1alpha1

import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

// +genclient
// +kubebuilder:object:root=true

// PendingWorkload is a user-facing representation of a pending workload that summarizes the relevant information for
Expand All @@ -34,20 +29,45 @@ type PendingWorkload struct {
metav1.ObjectMeta `json:"metadata,omitempty"`
}

// +genclient
// +kubebuilder:object:root=true
// +k8s:openapi-gen=true
// +genclient:nonNamespaced
// +genclient:method=GetPendingWorkloadsSummary,verb=get,subresource=pendingworkloads,result=sigs.k8s.io/kueue/apis/visibility/v1alpha1.PendingWorkloadsSummary
type ClusterQueue struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`

// PendingWorkloadSummary contains a list of pending workloads in the context
// of the query (within LocalQueue or ClusterQueue).
type PendingWorkloadSummary struct {
Summary PendingWorkloadsSummary `json:"pendingworkloadsummary"`
}

// +kubebuilder:object:root=true
type ClusterQueueList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`

Items []ClusterQueue `json:"items"`
}

// +k8s:openapi-gen=true
// +kubebuilder:object:root=true

// PendingWorkloadsSummary contains a list of pending workloads in the context
// of the query (within LocalQueue or ClusterQueue).
type PendingWorkloadsSummary struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`

Items []PendingWorkload `json:"items"`
}

// +kubebuilder:object:root=true
type PendingWorkloadList PendingWorkloadSummary
type PendingWorkloadsSummaryList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`

Items []PendingWorkloadsSummary `json:"items"`
}

// +kubebuilder:object:root=true
// +k8s:openapi-gen=true
Expand All @@ -67,7 +87,7 @@ type PendingWorkloadOptions struct {

func init() {
SchemeBuilder.Register(
&PendingWorkloadSummary{},
&PendingWorkloadsSummary{},
&PendingWorkloadOptions{},
)
}
92 changes: 75 additions & 17 deletions apis/visibility/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions client-go/applyconfiguration/utils.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 8e2fad8

Please sign in to comment.