Skip to content

Commit

Permalink
test(go): Move the test project for GoMod under a dedicated directory
Browse files Browse the repository at this point in the history
This is now consistent with GoDep.

Signed-off-by: Frank Viernau <frank_viernau@epam.com>
  • Loading branch information
fviernau committed Nov 1, 2023
1 parent 4b6bc22 commit e64746d
Show file tree
Hide file tree
Showing 27 changed files with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions plugins/package-managers/go/src/funTest/kotlin/GoModFunTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class GoModFunTest : StringSpec({
val testDir = getAssetFile("projects/synthetic")

"Project dependencies are detected correctly" {
val definitionFile = testDir.resolve("gomod/go.mod")
val definitionFile = testDir.resolve("gomod/gomod/go.mod")
val expectedResultFile = testDir.resolve("gomod-expected-output.yml")

val result = create("GoMod").resolveSingleProject(definitionFile)
Expand All @@ -45,7 +45,7 @@ class GoModFunTest : StringSpec({
}

"Project dependencies are detected correctly if the main package does not contain any code" {
val definitionFile = testDir.resolve("gomod-subpkg/go.mod")
val definitionFile = testDir.resolve("gomod/subpkg/go.mod")
val expectedResultFile = testDir.resolve("gomod-subpkg-expected-output.yml")

val result = create("GoMod").resolveSingleProject(definitionFile)
Expand All @@ -54,7 +54,7 @@ class GoModFunTest : StringSpec({
}

"Project dependencies are detected correctly if there are no dependencies" {
val definitionFile = testDir.resolve("gomod-no-deps/go.mod")
val definitionFile = testDir.resolve("gomod/no-deps/go.mod")
val expectedResultFile = testDir.resolve("gomod-no-deps-expected-output.yml")

val result = create("GoMod").resolveSingleProject(definitionFile)
Expand All @@ -63,7 +63,7 @@ class GoModFunTest : StringSpec({
}

"Project dependencies of a main module in a multi-module workspaces are detected correctly" {
val definitionFile = testDir.resolve("gomod-workspaces/go.mod")
val definitionFile = testDir.resolve("gomod/workspaces/go.mod")
val expectedResultFile = testDir.resolve("gomod-workspaces-main-module-expected-output.yml")

val result = create("GoMod").resolveSingleProject(definitionFile)
Expand All @@ -72,7 +72,7 @@ class GoModFunTest : StringSpec({
}

"Project dependencies of a submodule in a multi-module workspaces are detected correctly" {
val definitionFile = testDir.resolve("gomod-workspaces/other-module/go.mod")
val definitionFile = testDir.resolve("gomod/workspaces/other-module/go.mod")
val expectedResultFile = testDir.resolve("gomod-workspaces-sub-module-expected-output.yml")

val result = create("GoMod").resolveSingleProject(definitionFile)
Expand All @@ -81,7 +81,7 @@ class GoModFunTest : StringSpec({
}

"Unused dependencies are not contained in the result" {
val definitionFile = testDir.resolve("gomod-unused-deps/go.mod")
val definitionFile = testDir.resolve("gomod/unused-deps/go.mod")
val expectedResultFile = testDir.resolve("gomod-unused-deps-expected-output.yml")

val result = create("GoMod").resolveSingleProject(definitionFile)
Expand All @@ -90,7 +90,7 @@ class GoModFunTest : StringSpec({
}

"Source files with dangling embed directives do not yield issues" {
val definitionFile = testDir.resolve("gomod-dangling-embed/go.mod")
val definitionFile = testDir.resolve("gomod/dangling-embed/go.mod")
val expectedResultFile = testDir.resolve("gomod-dangling-embed-expected-output.yml")

val result = create("GoMod").resolveSingleProject(definitionFile)
Expand All @@ -99,8 +99,8 @@ class GoModFunTest : StringSpec({
}

"Project dependencies with a (relative) local module dependency are detected correctly" {
val definitionFileApp = testDir.resolve("gomod-submodules/app/go.mod")
val definitionFileUtils = testDir.resolve("gomod-submodules/utils/go.mod")
val definitionFileApp = testDir.resolve("gomod/submodules/app/go.mod")
val definitionFileUtils = testDir.resolve("gomod/submodules/utils/go.mod")
val expectedResultFile = testDir.resolve("gomod-submodules-expected-output.yml")
val expectedDefinitionFilePathUtils = getDefinitionFilePath(definitionFileUtils)

Expand Down

0 comments on commit e64746d

Please sign in to comment.