~/lightning

Lightning Talk: Fake it Until You Make it: Unit Tests with Go-Client Fake Client

Lightningat KubeCon + CloudNativeCon Europe 2019 · on Monday, 2019-05-20· at 17:12· Hall 8.0 A1· [testing, go]
links:none on file
slides:none on file

Shows how to use the client-go Fake Client (the object-tracker-backed fake that implements the clientset interface) to unit test Kubernetes calls. Walks through a concrete getSecrets function that returns a map of secretName → key/value pairs, programmatically creates two secrets on the fake.Clientset, calls the function, and asserts specific values. Includes runnable code and a GitHub link so tests actually run and verify behavior.

AI-written summary · about

  1. 0:00Introduction
  2. 0:10Overview
  3. 0:30What is the Fake Client
  4. 1:28Benefits
  5. 1:42Example
  6. 2:00Get Secrets
  7. 2:48Unit Test
  8. 3:11Create Function
  9. 3:36Demo
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.