Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Mocks = newFakeBuilderMocks()
Mocks objects to inject Fake resources from SyncFromCloud.
Warning: this is operates on global variables, which means that tests that depend on this CANNOT be run in parallel.
Functions ¶
Types ¶
type Builder ¶
type Builder struct {
rnode.BuilderBase
FakeOutRefs []rnode.ResourceRef
OutRefsErr error
FakeSyncError error
// contains filtered or unexported fields
}
Builder for Fake resource. Used only for testing.
func (*Builder) Resource ¶
func (b *Builder) Resource() rnode.UntypedResource
func (*Builder) SetResource ¶
func (b *Builder) SetResource(u rnode.UntypedResource) error
type FakeBuilderMocks ¶
type FakeBuilderMocks struct {
// contains filtered or unexported fields
}
func (*FakeBuilderMocks) Add ¶
func (m *FakeBuilderMocks) Add(b *Builder) bool
Add the mocked fake. Returns true if the mock exists for the given b.ID().
Warning: this is a global, which means that tests that depend on this CANNOT be run in parallel.
func (*FakeBuilderMocks) Clear ¶
func (m *FakeBuilderMocks) Clear()
Clear the mocked Fake objects.
Warning: this is operates on global variables, which means that tests that depend on this CANNOT be run in parallel.
type FakeResource ¶
type FakeResource struct {
Name string
// Value is compared in Diff.
Value string
// Dependencies are URLs to other resources i.e. OutRefs.
Dependencies []string
NullFields []string
ForceSendFields []string
}
FakeResource is a resource used only for testing.
type Mutable ¶ added in v1.35.0
type Mutable = api.MutableResource[FakeResource, FakeResource, FakeResource]
func NewWithTraits ¶ added in v1.35.0
func NewWithTraits(project string, key *meta.Key, tr api.TypeTrait[FakeResource, FakeResource, FakeResource]) Mutable
type Resource ¶ added in v1.35.0
type Resource = api.Resource[FakeResource, FakeResource, FakeResource]
Resource for testing.
type TypeTrait ¶ added in v1.35.0
type TypeTrait struct {
api.BaseTypeTrait[FakeResource, FakeResource, FakeResource]
}
Click to show internal directories.
Click to hide internal directories.