Add omitempty json tag to fake.ConnectionDetailsLastPublishedTimer.Time field
Signed-off-by: Alper Rifat Ulucinar <ulucinar@users.noreply.github.com>
This commit is contained in:
parent
bce61005a1
commit
31279534ed
|
|
@ -249,7 +249,13 @@ func (m *EnvironmentConfigReferencer) GetEnvironmentConfigReferences() []corev1.
|
||||||
|
|
||||||
// ConnectionDetailsLastPublishedTimer is a mock that implements the
|
// ConnectionDetailsLastPublishedTimer is a mock that implements the
|
||||||
// ConnectionDetailsLastPublishedTimer interface.
|
// ConnectionDetailsLastPublishedTimer interface.
|
||||||
type ConnectionDetailsLastPublishedTimer struct{ Time *metav1.Time }
|
type ConnectionDetailsLastPublishedTimer struct {
|
||||||
|
// NOTE: runtime.DefaultUnstructuredConverter.ToUnstructured
|
||||||
|
// cannot currently handle if `Time` is nil here.
|
||||||
|
// The `omitempty` json tag is a workaround that
|
||||||
|
// prevents a panic.
|
||||||
|
Time *metav1.Time `json:"lastPublishedTime,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
// SetConnectionDetailsLastPublishedTime sets the published time.
|
// SetConnectionDetailsLastPublishedTime sets the published time.
|
||||||
func (c *ConnectionDetailsLastPublishedTimer) SetConnectionDetailsLastPublishedTime(t *metav1.Time) {
|
func (c *ConnectionDetailsLastPublishedTimer) SetConnectionDetailsLastPublishedTime(t *metav1.Time) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue