1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00
Commit Graph

6 Commits

Author SHA1 Message Date
Mikko Aspiala
293cdb87ec Simplify dependencies for a component
Co-authored-by: Janne Savolainen <janne.savolainen@live.fi>
Signed-off-by: Mikko Aspiala <mikko.aspiala@houston-inc.com>
2021-12-04 12:19:29 +02:00
Mikko Aspiala
cfaf5f9402 Bundle dependencies of a component to a composing object
Co-authored-by: Janne Savolainen <janne.savolainen@live.fi>
Signed-off-by: Mikko Aspiala <mikko.aspiala@houston-inc.com>
2021-12-04 12:19:12 +02:00
Mikko Aspiala
78a989a72a Implement first meaningful unit tests for a complete behavior
Note: in this case, the behavior is even asynchronous, and thus a tool "asyncFn" is used to keep the test as simple as possible.

Co-authored-by: Janne Savolainen <janne.savolainen@live.fi>
Signed-off-by: Mikko Aspiala <mikko.aspiala@gmail.com>
2021-12-04 12:18:17 +02:00
Janne Savolainen
ec075ad957 Fix code style
Signed-off-by: Janne Savolainen <janne.savolainen@houston-inc.com>
2021-12-04 12:16:33 +02:00
Janne Savolainen
a2f9a76add Kludge first unit test with more than minimal data
This is a kludge because extraction of segregated interface for KubeObject is very difficult. This commit uses actual instance of KubeObject instead as a fake.

Signed-off-by: Janne Savolainen <janne.savolainen@houston-inc.com>
2021-12-04 12:16:33 +02:00
Janne Savolainen
350f07b457 Introduce first unit test made possible because of recently demonstrated changes
Key changes were:
- Introduction of dependencies as interfaces to permit stubbing in general (Dependency Inversion Principle)
- Introduction of segregated interfaces to only require stubbing of minimal stuff (Interface Segregation Principle)

Signed-off-by: Janne Savolainen <janne.savolainen@houston-inc.com>
2021-12-04 12:16:33 +02:00