goss
goss copied to clipboard
Either drop file/size from add/autoadd OR add md5 and sha to it.
Need to make a decision on which one of these attributes are included in add and which are not:
- Size
- md5
- sha256
SHA-256 may be the most sensible and current attribute to default to? Especially with the recent (last year or so) posts about SHA-1 / MD5 collisions.
If one of them were to stay sha256 makes the most sense.
I'm just not sure if sha256 by default is a useful addition or an annoyance (generated test too rigid).
I can go either way on this one. Drop them all, add them all, or only keep sha256.
When deciding on defaults, it's often best to go the "simpler" route.
IMO, it's best to use none of those checks and to let the user decide what he/she wants to add.
Perhaps this opens the door on supporting additional flags to goss add
for the file
test, e.g. --checksum
. Thoughts?
So the opposite exists today in Goss with --exclude-attr
. There could be an --include-xtra-attr
global flag that does this.
That said, to your point about "simpler." It really comes down to what would the majority of users expect from a goss add file
. My gut tells me @pysysops is right with just sha256, but no size.
I think it comes down to whether or not a file is expected to change very often. While I enjoy a special love for the sha256 test, I cannot claim one way or the other that static files are the target of the majority use case.
Yeah, that's what bother me about size. It's such a flakey test, but with even less value than sha256.
Maybe less is more. Keep all the "extra" tests as manual.
FWIW, I wouldn't be opposed to switching out size
with sha256
to see what kind of feedback it generates.
Deciding to drop size