Closed catdevman closed 6 years ago
Hey, looking at what serverspec does under the hood: https://github.com/mizzy/serverspec/blob/master/lib/serverspec/type/php_config.rb#L6
Basically, exactly what your workaround is doing (execute a php command). Personally I think Goss is great as it doesn't hide or abstract things away in more specific resources or types. It gives you a solid set of primitives to work with and I gain the benefit of fully understanding how a particular validation is working.
You could probably achieve the above with the file resource.
Other options might be to expose the config to localhost (if you're running http / web apps) and check for the important values using the http resource.
@pysysops Yeah that makes sense to me. Thanks for reviewing this idea I think that this can be closed so I will do that.
@aelsabbahy I believe that the php_config serverspec resource is useful. I would like to try and add it to Goss. My question here is would that feature be accepted into the code here? I want to add it to Goss because we don't use ruby anywhere else so I have to install the language and a bunch of extra dependencies just to get a simple feature from serverspec that goss doesn't have out of the box. I prefer Goss because it is a simple binary and a simple config file and I am done.
Here is my current work around:
but I would like the configuration to look more like:
I would love to hear your thoughts. Just thought it might be nice to have php_config as a first class citizen. Just so you know I am new to Go so any code that I would write would probably need to be heavily reviewed. If that is something that you think would be worth adding to Goss please let me know and I will gladly work on it, if not then we can close this.