-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Is your feature request related to a problem? Please describe.
Datacenters are powerful, but are a pain to test. The usage of hooks is especially complicated because references to this.* don't point to specific things, but rather resources that may be deployed by applications. This makes type checking and erroring very difficult.
Describe the solution you'd like
The only way to really test hooks is to provide the datacenter with relevant "context". The best context for datacenters is an environment config or a component that you're trying to deploy. What I'd like to be able to do is run a command that will show my a live diff of changes that my datacenter would yield.
I'd want to provide a component/environment and a datacenter file path and get the equivalent of a terraform plan. However, instead of showing me changes compared to a remote environment (I don't want to deploy anything yet), I'd want to see changes compared to the original datacenter file. The command should keep a process open and will start with a diff with zero changes. Then as I make changes to the datacenter file, the diff will live update to show me which nodes in the graph are updated in which ways.
$ arcctl test datacenter ./path/to/datacenter.yml -e ./path/to/environment.yml
// or
$ arcctl test datacenter ./path/to/datacenter.yml -c ./path/to/component.ymlReally, this command can show the diff of changes whenever ANY of the referenced files change to make it useful for testing environments as well.