cmd/cue: add sanity check that 'cue mod publish' is idempotent
https://cuelang.org/issue/3129 captures the fact the 'cue mod publish'
should be idempotent with respect to the contents of a module. It is
also the case that given the same "state" (with respect to source.kind),
'cue mod publish' should be idempotent.
Along with a rather large explanation on the expectations of the
in-memory OCI server, this CL adds a simple check that 'cue mod publish'
is idempotent for the two existing source.kind values, "self" and "git".
Fixes #3129.
Signed-off-by: Paul Jolly <paul@myitcv.io>
Change-Id: I131e58c7726912e656b2023626fe36a9792e7e55
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1195805
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>