Skip to content

Latest commit

 

History

History
37 lines (26 loc) · 2.1 KB

examples.md

File metadata and controls

37 lines (26 loc) · 2.1 KB

Examples

All examples are rooted in a directory that holds a standalone golang module with a replace directive to consume the local version of kubedog.

  1. Clone the repository
  2. Move to the directory of the example you want to run
  3. Run

To run the examples outside of the repository, you need to remove the replace directive and use a valid kubedog version.

usage

  1. usage/features/deploy-pod.feature: is the *.feature file defining the behavior to test
  2. usage/templates: holds the Kubernetes yaml files, they could be templated
  3. usage/main_test.go: is the test implementation with the minimum recommended setup for godog and kubedog

templating/kube

The kube package has built-in templating support, this example showcases that.

  1. templating/kube/features/deploy-pod.feature: same as usage
  2. templating/kube/templates: similar to usage, but the files are templated
  3. templating/kube/main_test.go: similar to usage, but it adds templating implementation

templating/generic

The generic package offers general purpose file templating, this example showcases that.

  1. templating/generic/files: templated files
  2. templating/generic/main.go: templating implementation