Cleaned up all interesting static checks. All that is left is cosmetics.

Signed-off-by: quobix <dave@quobix.com>
This commit is contained in:
quobix
2024-02-06 22:03:53 -05:00
parent 561396d85d
commit 7afb1e9d11
39 changed files with 180 additions and 279 deletions

View File

@@ -113,8 +113,6 @@ func Test_extractRequiredReferenceProperties_abs3(t *testing.T) {
assert.Len(t, props, 1)
if runtime.GOOS != "windows" {
assert.Equal(t, "cakes", props["/big/fat/oh/pillow.yaml"][0])
} else {
// assert.Equal(t, "cakes", props["C:\\big\\fat\\oh\\pillow.yaml"][0]) drive could be anything
}
assert.NotNil(t, data)
}
@@ -131,8 +129,6 @@ func Test_extractRequiredReferenceProperties_rel_full(t *testing.T) {
assert.Len(t, props, 1)
if runtime.GOOS != "windows" {
assert.Equal(t, "cakes", props["/chalky/milky/camel.yaml#/a/nice/picture/of/cake"][0])
} else {
//assert.Equal(t, "cakes", props["C:\\chalky\\milky\\camel.yaml#/a/nice/picture/of/cake"][0])
}
assert.NotNil(t, data)
}
@@ -149,9 +145,6 @@ func Test_extractRequiredReferenceProperties_rel(t *testing.T) {
assert.Len(t, props, 1)
if runtime.GOOS != "windows" {
assert.Equal(t, "cakes", props["/oh/camel.yaml#/rum/cake"][0])
} else {
//cwd, _ := os.Getwd()
//assert.Equal(t, "cakes", props[filepath.Dir(cwd)+"\\oh\\camel.yaml#/rum/cake"][0])
}
assert.NotNil(t, data)
}
@@ -168,9 +161,6 @@ func Test_extractRequiredReferenceProperties_abs2(t *testing.T) {
assert.Len(t, props, 1)
if runtime.GOOS != "windows" {
assert.Equal(t, "cakes", props["/oh/my/camel.yaml#/rum/cake"][0])
} else {
//cwd, _ := os.Getwd()
//assert.Equal(t, "cakes", props[filepath.Dir(cwd)+"\\oh\\my\\camel.yaml#/rum/cake"][0])
}
assert.NotNil(t, data)
}
@@ -257,8 +247,6 @@ func Test_extractRequiredReferenceProperties_nocomponent_http2(t *testing.T) {
assert.Len(t, props, 1)
if runtime.GOOS != "windows" {
assert.Equal(t, "cakes", props["/go-to-bed.com/no/more/cake.yaml"][0])
} else {
//assert.Equal(t, "cakes", props["C:\\go-to-bed.com\\no\\more\\cake.yaml"][0])
}
assert.NotNil(t, data)
}