mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-05 07:27:21 +00:00
openapi: refactor into more generic structure
Refactor the openapi schema to be a more generic structure that can be "visited" to get more specific types.
This commit is contained in:
@@ -27,7 +27,7 @@ import (
|
||||
|
||||
var _ = Describe("Getting the Resources", func() {
|
||||
var client *fakeOpenAPIClient
|
||||
var expectedData *openapi.Resources
|
||||
var expectedData openapi.Resources
|
||||
var instance openapi.Getter
|
||||
|
||||
BeforeEach(func() {
|
||||
@@ -47,12 +47,12 @@ var _ = Describe("Getting the Resources", func() {
|
||||
|
||||
result, err := instance.Get()
|
||||
Expect(err).To(BeNil())
|
||||
expectEqual(result, expectedData)
|
||||
Expect(result).To(Equal(expectedData))
|
||||
Expect(client.calls).To(Equal(1))
|
||||
|
||||
result, err = instance.Get()
|
||||
Expect(err).To(BeNil())
|
||||
expectEqual(result, expectedData)
|
||||
Expect(result).To(Equal(expectedData))
|
||||
// No additional client calls expected
|
||||
Expect(client.calls).To(Equal(1))
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user