feat: Add instance autokill#355
Conversation
| assert.Regexp(t, `autokill:`, out) | ||
| assert.Regexp(t, `time:\s+10s`, out) | ||
| assert.Regexp(t, `num-requests:\s+100`, out) | ||
|
|
There was a problem hiding this comment.
Can we make it auto-kill on 1 request and then do an httpget on it and check again if it dissapeared?
There was a problem hiding this comment.
Hm. This feels like something for the QA team.
We test that the property can be created + edited + viewed - so the CLI is working correctly. We should avoid testing that the platform behavior is correct (as much as possible in these tests).
More complex tests make sense in some scenarios... but I think this one is a bit over-the-line. If you think otherwise, I can hack something together though.
There was a problem hiding this comment.
I'm fine either way, but I don't think that the functionality tested is that complex 🙏
I'll let you decide
Signed-off-by: Justin Chadwell <[email protected]>
bf86d2b to
ee13210
Compare
|
|
||
| ScaleToZero InstanceScaleToZero `group:"flag-edit" shortcut:"scale-to-zero" help:"Scale-to-zero options.\n policy: on | idle | off\n cooldown-time: cooldown in ms before scaling to zero\n notify-time: notification time in ms before scaling to zero\n stateful: true | false" placeholder:"<key>=<value>" example:"on,policy=on\\,cooldown-time=300,policy=on\\,stateful=true\\,cooldown-time=500\\,notify-time=100"` | ||
|
|
||
| Autokill InstanceAutokill `group:"flag-edit" shortcut:"autokill" help:"Autokill options.\n time: time after the instance stops before it is deleted\n num-requests: max requests before the instance is deleted" placeholder:"<key>=<value>" example:"time=5s,num-requests=100,time=5s\\,num-requests=100"` |
There was a problem hiding this comment.
| Autokill InstanceAutokill `group:"flag-edit" shortcut:"autokill" help:"Autokill options.\n time: time after the instance stops before it is deleted\n num-requests: max requests before the instance is deleted" placeholder:"<key>=<value>" example:"time=5s,num-requests=100,time=5s\\,num-requests=100"` | |
| Autokill InstanceAutokill `group:"flag-edit" shortcut:"autokill" help:"Autokill options.\n time: time after the instance stops before it is deleted\n num-requests: max requests before the instance is deleted" placeholder:"<key>=<value>" example:"time=5s,num-requests=100\\,num-requests=100"` |
TODO: