Comments (12)
It's fairly quick actually. Booting up Minikube takes a bit (45s), but every test is faster than you'd think. It kubectl apply
's the resources before every test and uses e.g. a deployment of a hello world docker image with imagePullPolicy: IfNotPresent
, so recreating pods takes about a second before every test.
from dotnet-kube-client.
kubectl delete --all
deletes all resources in a namespace :)
from dotnet-kube-client.
I love this idea - hadn’t had time to do it before but I agree it’s totally worth doing :)
I’ll take a look at PSKubectl’s scripts to see what it would take to set this up (external test suite is a good option, I think, as I don’t expect it to be quick to run?)
from dotnet-kube-client.
Had a quick look over your CI scripts - that all looks pretty achievable, especially since you’ve done most of the hard work already :)
from dotnet-kube-client.
I guess the only tricky bit would be cleaning up after each test :)
Maybe a decorator for IXXXClientVX
that captures names of resources created so we can run kubectl delete
after the test is complete?
from dotnet-kube-client.
What do you need to cleanup? The next test will just kubectl apply
the resources again so they get reset
from dotnet-kube-client.
kubectl apply --prune
also deletes resources
from dotnet-kube-client.
What about tests that use the client to create resources?
I guess I could just write a script to delete all resources in a given namespace or something...
from dotnet-kube-client.
For gets or deletes though, yeah, it’d be fine.
from dotnet-kube-client.
As said kubectl apply --prune
should delete all resources that are not present in the input YAML afaik
from dotnet-kube-client.
Oh - interesting, I hadn’t heard of that usage but that would do the trick :)
from dotnet-kube-client.
Ah, apparently that only removes resources created by kubectl apply
(not ones created by the client). Still, sounds useful :)
from dotnet-kube-client.
Related Issues (20)
- Project direction / contributions HOT 7
- How is the ApiEndPoint configured for this parameter HOT 5
- Can I debug and load configMap locally? HOT 26
- IEventClientV1 fails to convert time value HOT 15
- Error while trying to create HorizontalPodAutoscaler with DynamicResourceClient HOT 7
- Aysnc methods on resource clients do not use standard Async naming conventions HOT 3
- Access full details of STATUS column from "kubectl get pod" HOT 1
- No authentication needed for url HOT 2
- KubeClient.Models.ObjectMetaV1.Annotations Should not be read-only
- Metadata doesn't get built for write-only models HOT 3
- WatchAll is missing for some resources HOT 4
- Field selectors for pods not implemented HOT 6
- Credential Plugins (AKS / AAD) Support HOT 1
- Detect current Pod namespace HOT 4
- Cannot find resource API for kind for Istio CRD HOT 6
- Upgrade to a newer version of YamlDotNet HOT 1
- CVE-2018-8292 | System.Net.Http HOT 2
- ExecAndConnect example yields 403 Forbidden HOT 1
- Cannot get output when using ExecAndConnect HOT 3
- Periods in ConfigMap keys get replaced by colons without any possibility of escape. HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dotnet-kube-client.