appconfigmgrv2

command module
v0.0.0-...-16baae6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 29, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

README

Anthos AppConfig CRD

Testing

Integration & Unit

Running unit and integration tests:

make test

The output of will show test coverage.

Integration tests are ran by spinning up the kubernetes control plane and asserting that expected resources are created. Test isolation is accomplished by spinning up a reconciler and creating an instance of the CRD at the beginning of each test case:

func TestSomething(t *testing.T) {
	r, stop := startTestReconciler(t)
	defer stop()
	in, cleanup := createTestInstance(t, true)
	defer cleanup()

	# Assert that expected resources are created.
}
End-to-End

End-to-end tests are defined at $REPO_ROOT/tests. They are written in python and executed on GCP via a cloudbuild job.

Environment (go 1.12)

cd ./appconfigmgrv2
export KUBECONFIG= # for make commands that do deployment during testing locally
export GO111MODULE=on
export GOPATH= # - e.g. /Users/joseret/go112
export PATH=$PATH:/usr/local/kubebuilder2/bin # add kubebuilder
  1. rm go.mod and go.sum
  2. go mod init
  3. go get sigs.k8s.io/controller-runtime@v0.2.0-beta.2

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
api
v1alpha1
Package v1alpha1 contains API Schema definitions for the appconfigmgr v1alpha1 API group +kubebuilder:object:generate=true +groupName=appconfigmgr.cft.dev
Package v1alpha1 contains API Schema definitions for the appconfigmgr v1alpha1 API group +kubebuilder:object:generate=true +groupName=appconfigmgr.cft.dev

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL