Compare commits

...

3 Commits

Author SHA1 Message Date
Ilya Kuznetsov b94d11463f
Merge 15110753dd into f2096eddcc 2025-02-11 01:55:14 -08:00
Denis Bilenko f2096eddcc
acc: Do not show all replacements on every failure (#2331)
## Changes
- Only print replacements if VERBOSE_TEST flag is set.
- This is set on CI but not when you do "go test" or "make test".

Note, env var is used, so that it can be set in Makefile.

## Tests
Manually.
2025-02-11 09:38:53 +00:00
Ilya Kuznetsov 15110753dd
Flatten version of documentation 2025-02-03 18:02:25 +01:00
6 changed files with 3496 additions and 7221 deletions

View File

@ -28,7 +28,7 @@ test:
cover:
rm -fr ./acceptance/build/cover/
CLI_GOCOVERDIR=build/cover ${GOTESTSUM_CMD} -- -coverprofile=coverage.txt ${PACKAGES}
VERBOSE_TEST=1 CLI_GOCOVERDIR=build/cover ${GOTESTSUM_CMD} -- -coverprofile=coverage.txt ${PACKAGES}
rm -fr ./acceptance/build/cover-merged/
mkdir -p acceptance/build/cover-merged/
go tool covdata merge -i $$(printf '%s,' acceptance/build/cover/* | sed 's/,$$//') -o acceptance/build/cover-merged/
@ -61,6 +61,6 @@ integration: vendor
$(INTEGRATION)
integration-short: vendor
$(INTEGRATION) -short
VERBOSE_TEST=1 $(INTEGRATION) -short
.PHONY: lint tidy lintcheck fmt test cover showcover build snapshot vendor schema integration integration-short acc-cover acc-showcover docs

View File

@ -30,8 +30,9 @@ import (
)
var (
KeepTmp bool
NoRepl bool
KeepTmp bool
NoRepl bool
VerboseTest bool = os.Getenv("VERBOSE_TEST") != ""
)
// In order to debug CLI running under acceptance test, set this to full subtest name, e.g. "bundle/variables/empty"
@ -412,7 +413,7 @@ func doComparison(t *testing.T, repls testdiff.ReplacementsContext, dirRef, dirN
testutil.WriteFile(t, pathRef, valueNew)
}
if !equal && printedRepls != nil && !*printedRepls {
if VerboseTest && !equal && printedRepls != nil && !*printedRepls {
*printedRepls = true
var items []string
for _, item := range repls.Repls {

View File

@ -15,7 +15,8 @@ func buildMarkdown(nodes []rootNode, outputFile, header string) error {
if node.TopLevel {
m = m.H2(node.Title)
} else {
m = m.H3(node.Title)
// m = m.H3(node.Title)
m = m.H2(node.Title)
}
m = m.LF()

View File

@ -169,7 +169,8 @@ func getAttributes(props, refs map[string]*jsonschema.Schema, ownFields map[stri
}
var reference string
if isReferenceType(v, refs, ownFields) && !circular {
reference = prefix + "." + k
// reference = prefix + "." + k
reference = k
}
attributes = append(attributes, attributeNode{
Title: k,
@ -209,7 +210,8 @@ func extractNodes(prefix string, props, refs map[string]*jsonschema.Schema, ownF
}
v = resolveRefs(v, refs)
if v.Type == "object" || v.Type == "array" {
nodes = append(nodes, rootProp{prefix + "." + k, v, false, isCycleField(k)})
// nodes = append(nodes, rootProp{prefix + "." + k, v, false, isCycleField(k)})
nodes = append(nodes, rootProp{k, v, false, isCycleField(k)})
}
}
return nodes

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff