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 Fake ¶
type Fake = api.Resource[FakeResource, FakeResource, FakeResource]
Fake resource for testing.
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 MutableFake ¶
type MutableFake = api.MutableResource[FakeResource, FakeResource, FakeResource]
func NewMutableFake ¶
func NewMutableFake(project string, key *meta.Key) MutableFake
Click to show internal directories.
Click to hide internal directories.