README
¶
How we added/built stand-alone tests for Falco
- git clone
mkdir/cni
cd cni/
go mod init github.com/aws/aws-k8s-tester/k8s-tester/cni
- Create a file to implement the Tester Interface.
touch tester.go
- copy a vend file from another package
cp ../vend.sh .
- Write tests
- run
./vend.sh
- run
go mod tidy -v
Test/Run singe test stand-alone
go run cmd/k8s-tester-cni/main.go apply \
--kubectl-path="/usr/local/bin/kubectl" \
--kubeconfig-path="/Users/jonahjo/.kube/config" \
--log-outputs="cni.log"
## Delete
go run cmd/k8s-tester-cni/main.go delete \
--kubectl-path="/usr/local/bin/kubectl" \
--kubeconfig-path="/Users/jonahjo/.kube/config" \
--log-outputs="cni.log"
Documentation
¶
Index ¶
Constants ¶
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(cfg *Config) k8s_tester.Tester
Types ¶
type Config ¶
type Config struct { Enable bool `json:"enable"` Prompt bool `json:"-"` Stopc chan struct{} `json:"-"` Logger *zap.Logger `json:"-"` LogWriter io.Writer `json:"-"` Client client.Client `json:"-"` // MinimumNodes is the minimum number of Kubernetes nodes required for installing this addon. MinimumNodes int `json:"minimum_nodes"` // Namespace to create test resources. Namespace string `json:"namespace"` // CNINamespace is the namespace the CNI daemonset is deployed to CNINamespace string `json:"cni_namespace"` }
func NewDefault ¶
func NewDefault() *Config
func (*Config) ValidateAndSetDefaults ¶
Directories
¶
Path | Synopsis |
---|---|
cmd
|
|
k8s-tester-cni
k8s-tester-cni installs Kubernetes cni tester.
|
k8s-tester-cni installs Kubernetes cni tester. |
Click to show internal directories.
Click to hide internal directories.