-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Update e2e test data for test-framework #2129
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
Merged
camilamacedo86
merged 2 commits into
operator-framework:master
from
camilamacedo86:fix-test-gen-bkp
Nov 9, 2019
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
test/test-framework/pkg/apis/cache/v1alpha1/zz_generated.deepcopy.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
221 changes: 221 additions & 0 deletions
221
test/test-framework/pkg/apis/cache/v1alpha1/zz_generated.openapi.go
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,221 @@ | ||
// +build !ignore_autogenerated | ||
|
||
// This file was autogenerated by openapi-gen. Do not edit it manually! | ||
|
||
package v1alpha1 | ||
|
||
import ( | ||
spec "github.com/go-openapi/spec" | ||
common "k8s.io/kube-openapi/pkg/common" | ||
) | ||
|
||
func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition { | ||
return map[string]common.OpenAPIDefinition{ | ||
"github.com/operator-framework/operator-sdk/test/test-framework/pkg/apis/cache/v1alpha1.Memcached": schema_pkg_apis_cache_v1alpha1_Memcached(ref), | ||
"github.com/operator-framework/operator-sdk/test/test-framework/pkg/apis/cache/v1alpha1.MemcachedRS": schema_pkg_apis_cache_v1alpha1_MemcachedRS(ref), | ||
"github.com/operator-framework/operator-sdk/test/test-framework/pkg/apis/cache/v1alpha1.MemcachedRSSpec": schema_pkg_apis_cache_v1alpha1_MemcachedRSSpec(ref), | ||
"github.com/operator-framework/operator-sdk/test/test-framework/pkg/apis/cache/v1alpha1.MemcachedRSStatus": schema_pkg_apis_cache_v1alpha1_MemcachedRSStatus(ref), | ||
"github.com/operator-framework/operator-sdk/test/test-framework/pkg/apis/cache/v1alpha1.MemcachedSpec": schema_pkg_apis_cache_v1alpha1_MemcachedSpec(ref), | ||
"github.com/operator-framework/operator-sdk/test/test-framework/pkg/apis/cache/v1alpha1.MemcachedStatus": schema_pkg_apis_cache_v1alpha1_MemcachedStatus(ref), | ||
} | ||
} | ||
|
||
func schema_pkg_apis_cache_v1alpha1_Memcached(ref common.ReferenceCallback) common.OpenAPIDefinition { | ||
return common.OpenAPIDefinition{ | ||
Schema: spec.Schema{ | ||
SchemaProps: spec.SchemaProps{ | ||
Description: "Memcached is the Schema for the memcacheds API", | ||
Type: []string{"object"}, | ||
Properties: map[string]spec.Schema{ | ||
"kind": { | ||
SchemaProps: spec.SchemaProps{ | ||
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", | ||
Type: []string{"string"}, | ||
Format: "", | ||
}, | ||
}, | ||
"apiVersion": { | ||
SchemaProps: spec.SchemaProps{ | ||
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", | ||
Type: []string{"string"}, | ||
Format: "", | ||
}, | ||
}, | ||
"metadata": { | ||
SchemaProps: spec.SchemaProps{ | ||
Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), | ||
}, | ||
}, | ||
"spec": { | ||
SchemaProps: spec.SchemaProps{ | ||
Ref: ref("github.com/operator-framework/operator-sdk/test/test-framework/pkg/apis/cache/v1alpha1.MemcachedSpec"), | ||
}, | ||
}, | ||
"status": { | ||
SchemaProps: spec.SchemaProps{ | ||
Ref: ref("github.com/operator-framework/operator-sdk/test/test-framework/pkg/apis/cache/v1alpha1.MemcachedStatus"), | ||
}, | ||
}, | ||
}, | ||
}, | ||
}, | ||
Dependencies: []string{ | ||
"github.com/operator-framework/operator-sdk/test/test-framework/pkg/apis/cache/v1alpha1.MemcachedSpec", "github.com/operator-framework/operator-sdk/test/test-framework/pkg/apis/cache/v1alpha1.MemcachedStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, | ||
} | ||
} | ||
|
||
func schema_pkg_apis_cache_v1alpha1_MemcachedRS(ref common.ReferenceCallback) common.OpenAPIDefinition { | ||
return common.OpenAPIDefinition{ | ||
Schema: spec.Schema{ | ||
SchemaProps: spec.SchemaProps{ | ||
Description: "MemcachedRS is the Schema for the memcachedrs API", | ||
Type: []string{"object"}, | ||
Properties: map[string]spec.Schema{ | ||
"kind": { | ||
SchemaProps: spec.SchemaProps{ | ||
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", | ||
Type: []string{"string"}, | ||
Format: "", | ||
}, | ||
}, | ||
"apiVersion": { | ||
SchemaProps: spec.SchemaProps{ | ||
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", | ||
Type: []string{"string"}, | ||
Format: "", | ||
}, | ||
}, | ||
"metadata": { | ||
SchemaProps: spec.SchemaProps{ | ||
Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), | ||
}, | ||
}, | ||
"spec": { | ||
SchemaProps: spec.SchemaProps{ | ||
Ref: ref("github.com/operator-framework/operator-sdk/test/test-framework/pkg/apis/cache/v1alpha1.MemcachedRSSpec"), | ||
}, | ||
}, | ||
"status": { | ||
SchemaProps: spec.SchemaProps{ | ||
Ref: ref("github.com/operator-framework/operator-sdk/test/test-framework/pkg/apis/cache/v1alpha1.MemcachedRSStatus"), | ||
}, | ||
}, | ||
}, | ||
}, | ||
}, | ||
Dependencies: []string{ | ||
"github.com/operator-framework/operator-sdk/test/test-framework/pkg/apis/cache/v1alpha1.MemcachedRSSpec", "github.com/operator-framework/operator-sdk/test/test-framework/pkg/apis/cache/v1alpha1.MemcachedRSStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, | ||
} | ||
} | ||
|
||
func schema_pkg_apis_cache_v1alpha1_MemcachedRSSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { | ||
return common.OpenAPIDefinition{ | ||
Schema: spec.Schema{ | ||
SchemaProps: spec.SchemaProps{ | ||
Description: "MemcachedRSSpec defines the desired state of MemcachedRS", | ||
Type: []string{"object"}, | ||
Properties: map[string]spec.Schema{ | ||
"numNodes": { | ||
SchemaProps: spec.SchemaProps{ | ||
Type: []string{"integer"}, | ||
Format: "int32", | ||
}, | ||
}, | ||
}, | ||
Required: []string{"numNodes"}, | ||
}, | ||
}, | ||
} | ||
} | ||
|
||
func schema_pkg_apis_cache_v1alpha1_MemcachedRSStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { | ||
return common.OpenAPIDefinition{ | ||
Schema: spec.Schema{ | ||
SchemaProps: spec.SchemaProps{ | ||
Description: "MemcachedRSStatus defines the observed state of MemcachedRS", | ||
Type: []string{"object"}, | ||
Properties: map[string]spec.Schema{ | ||
"nodeList": { | ||
VendorExtensible: spec.VendorExtensible{ | ||
Extensions: spec.Extensions{ | ||
"x-kubernetes-list-type": "set", | ||
}, | ||
}, | ||
SchemaProps: spec.SchemaProps{ | ||
Type: []string{"array"}, | ||
Items: &spec.SchemaOrArray{ | ||
Schema: &spec.Schema{ | ||
SchemaProps: spec.SchemaProps{ | ||
Type: []string{"string"}, | ||
Format: "", | ||
}, | ||
}, | ||
}, | ||
}, | ||
}, | ||
"test": { | ||
SchemaProps: spec.SchemaProps{ | ||
Type: []string{"boolean"}, | ||
Format: "", | ||
}, | ||
}, | ||
}, | ||
Required: []string{"nodeList", "test"}, | ||
}, | ||
}, | ||
} | ||
} | ||
|
||
func schema_pkg_apis_cache_v1alpha1_MemcachedSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { | ||
return common.OpenAPIDefinition{ | ||
Schema: spec.Schema{ | ||
SchemaProps: spec.SchemaProps{ | ||
Description: "MemcachedSpec defines the desired state of Memcached", | ||
Type: []string{"object"}, | ||
Properties: map[string]spec.Schema{ | ||
"size": { | ||
SchemaProps: spec.SchemaProps{ | ||
Description: "Size is the size of the memcached deployment", | ||
Type: []string{"integer"}, | ||
Format: "int32", | ||
}, | ||
}, | ||
}, | ||
Required: []string{"size"}, | ||
}, | ||
}, | ||
} | ||
} | ||
|
||
func schema_pkg_apis_cache_v1alpha1_MemcachedStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { | ||
return common.OpenAPIDefinition{ | ||
Schema: spec.Schema{ | ||
SchemaProps: spec.SchemaProps{ | ||
Description: "MemcachedStatus defines the observed state of Memcached", | ||
Type: []string{"object"}, | ||
Properties: map[string]spec.Schema{ | ||
"nodes": { | ||
VendorExtensible: spec.VendorExtensible{ | ||
Extensions: spec.Extensions{ | ||
"x-kubernetes-list-type": "set", | ||
}, | ||
}, | ||
SchemaProps: spec.SchemaProps{ | ||
Description: "Nodes are the names of the memcached pods", | ||
Type: []string{"array"}, | ||
Items: &spec.SchemaOrArray{ | ||
Schema: &spec.Schema{ | ||
SchemaProps: spec.SchemaProps{ | ||
Type: []string{"string"}, | ||
Format: "", | ||
}, | ||
}, | ||
}, | ||
}, | ||
}, | ||
}, | ||
Required: []string{"nodes"}, | ||
}, | ||
}, | ||
} | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Can you remove this file? The SDK doesn't use this generated code.
Side note: I'm considering removing the generator for this file, since most SDK users do not use it, or at least make it optional.
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.
HI @estroz the update of the project has been done using the SDK so it will be generated since its commands generate it. Note that the goal is also to add a check to ensure that the mock data is updated with the current code source implementation always to avoid we are testing it with something that should be changed already. See #2131 for we add the test in the sanity.
So, if in the future we remove this file and/or change the commands then the test-framework should be updated accordingly to pass in the CI. Is it make sense?
PS.: I am trying here give the first steps for we stop to do changes manually on it regards the gen artefacts and in this avoid unexpected scenarios as well.
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.
For now we can keep it here. If we decide that removing the openapi generator is the right way to go we can remove this file.