Skip to content

Commit

Permalink
fix: updated dep graph fixture
Browse files Browse the repository at this point in the history
  • Loading branch information
dotkas committed Nov 16, 2023
1 parent cf5f3ca commit c21d58c
Show file tree
Hide file tree
Showing 21 changed files with 82 additions and 76 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
},
"pkgs": [
{
"id": ".@unspecified",
"id": "basic-with-deps@unspecified",
"info": {
"name": ".",
"name": "basic-with-deps",
"version": "unspecified"
}
},
Expand Down Expand Up @@ -66,7 +66,7 @@
"nodes": [
{
"nodeId": "root-node",
"pkgId": ".@unspecified",
"pkgId": "basic-with-deps@unspecified",
"deps": [
{
"nodeId": "unknown:guava-87e0fd1df874ea3cbe577702fe6f17068b790fd8@unknown"
Expand Down
6 changes: 3 additions & 3 deletions test/fixtures-with-wrappers/basic-with-deps/dep-graph.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
},
"pkgs": [
{
"id": ".@unspecified",
"id": "basic-with-deps@unspecified",
"info": {
"name": ".",
"name": "basic-with-deps",
"version": "unspecified"
}
},
Expand Down Expand Up @@ -66,7 +66,7 @@
"nodes": [
{
"nodeId": "root-node",
"pkgId": ".@unspecified",
"pkgId": "basic-with-deps@unspecified",
"deps": [
{
"nodeId": "com.google.guava:[email protected]"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
},
"pkgs": [
{
"id": ".@unspecified",
"id": "basic-with-failed-dep@unspecified",
"info": {
"name": ".",
"name": "basic-with-failed-dep",
"version": "unspecified"
}
},
Expand Down Expand Up @@ -66,7 +66,7 @@
"nodes": [
{
"nodeId": "root-node",
"pkgId": ".@unspecified",
"pkgId": "basic-with-failed-dep@unspecified",
"deps": [
{
"nodeId": "com.google.guava:[email protected]"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
},
"pkgs": [
{
"id": ".@unspecified",
"id": "configuration-consistency@unspecified",
"info": {
"name": ".",
"name": "configuration-consistency",
"version": "unspecified"
}
},
Expand Down Expand Up @@ -73,7 +73,7 @@
"nodes": [
{
"nodeId": "root-node",
"pkgId": ".@unspecified",
"pkgId": "configuration-consistency@unspecified",
"deps": [
{
"nodeId": "org.codehaus.groovy:[email protected]"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
},
"pkgs": [
{
"id": ".@unspecified",
"id": "custom-configuration@unspecified",
"info": {
"name": ".",
"name": "custom-configuration",
"version": "unspecified"
}
},
Expand Down Expand Up @@ -38,7 +38,7 @@
"nodes": [
{
"nodeId": "root-node",
"pkgId": ".@unspecified",
"pkgId": "custom-configuration@unspecified",
"deps": [
{
"nodeId": "org.mockito:[email protected]"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
},
"pkgs": [
{
"id": ".@unspecified",
"id": "no-build-gradle-in-root@unspecified",
"info": {
"name": ".",
"name": "no-build-gradle-in-root",
"version": "unspecified"
}
}
Expand All @@ -17,7 +17,7 @@
"nodes": [
{
"nodeId": "root-node",
"pkgId": ".@unspecified",
"pkgId": "no-build-gradle-in-root@unspecified",
"deps": []
}
]
Expand Down
6 changes: 3 additions & 3 deletions test/fixtures-with-wrappers/empty-project/dep-graph.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
},
"pkgs": [
{
"id": ".@unspecified",
"id": "basic@unspecified",
"info": {
"name": ".",
"name": "basic",
"version": "unspecified"
}
}
Expand All @@ -17,7 +17,7 @@
"nodes": [
{
"nodeId": "root-node",
"pkgId": ".@unspecified",
"pkgId": "basic@unspecified",
"deps": []
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
},
"pkgs": [
{
"id": ".@1.0.0-SNAPSHOT",
"id": "kts-basic-with-deps@1.0.0-SNAPSHOT",
"info": {
"name": ".",
"name": "kts-basic-with-deps",
"version": "1.0.0-SNAPSHOT"
}
},
Expand Down Expand Up @@ -101,7 +101,7 @@
"nodes": [
{
"nodeId": "root-node",
"pkgId": ".@1.0.0-SNAPSHOT",
"pkgId": "kts-basic-with-deps@1.0.0-SNAPSHOT",
"deps": [
{
"nodeId": "org.jetbrains.kotlin:[email protected]"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
},
"pkgs": [
{
"id": ".@1.0.0-SNAPSHOT",
"id": "kts-configuration-consistency@1.0.0-SNAPSHOT",
"info": {
"name": ".",
"name": "kts-configuration-consistency",
"version": "1.0.0-SNAPSHOT"
}
},
Expand Down Expand Up @@ -101,7 +101,7 @@
"nodes": [
{
"nodeId": "root-node",
"pkgId": ".@1.0.0-SNAPSHOT",
"pkgId": "kts-configuration-consistency@1.0.0-SNAPSHOT",
"deps": [
{
"nodeId": "org.jetbrains.kotlin:[email protected]"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
},
"pkgs": [
{
"id": ".@1.0.0-SNAPSHOT",
"id": "kts-strict-lock-mode@1.0.0-SNAPSHOT",
"info": {
"name": ".",
"name": "kts-strict-lock-mode",
"version": "1.0.0-SNAPSHOT"
}
},
Expand Down Expand Up @@ -101,7 +101,7 @@
"nodes": [
{
"nodeId": "root-node",
"pkgId": ".@1.0.0-SNAPSHOT",
"pkgId": "kts-strict-lock-mode@1.0.0-SNAPSHOT",
"deps": [
{
"nodeId": "org.jetbrains.kotlin:[email protected]"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"graph": {
"nodes": [{ "deps": [], "nodeId": "root-node", "pkgId": ".@1.0" }],
"nodes": [{ "deps": [], "nodeId": "root-node", "pkgId": "kts-version-catalog-module@1.0" }],
"rootNodeId": "root-node"
},
"pkgManager": { "name": "gradle" },
"pkgs": [
{
"id": ".@1.0",
"info": { "name": ".", "version": "1.0" }
"id": "kts-version-catalog-module@1.0",
"info": { "name": "kts-version-catalog-module", "version": "1.0" }
}
],
"schemaVersion": "1.2.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
},
"pkgs": [
{
"id": ".@unspecified",
"id": "platform-project-mvn-bom@unspecified",
"info": {
"name": ".",
"name": "platform-project-mvn-bom",
"version": "unspecified"
}
},
Expand Down Expand Up @@ -45,7 +45,7 @@
"nodes": [
{
"nodeId": "root-node",
"pkgId": ".@unspecified",
"pkgId": "platform-project-mvn-bom@unspecified",
"deps": [
{
"nodeId": "org.springframework.boot:[email protected]"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
},
"pkgs": [
{
"id": ".@unspecified",
"id": "repo-content-filtering@unspecified",
"info": {
"name": ".",
"name": "repo-content-filtering",
"version": "unspecified"
}
},
Expand Down Expand Up @@ -80,7 +80,7 @@
"nodes": [
{
"nodeId": "root-node",
"pkgId": ".@unspecified",
"pkgId": "repo-content-filtering@unspecified",
"deps": [
{
"nodeId": "com.google.guava:[email protected]"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
},
"pkgs": [
{
"id": ".@unspecified",
"id": "version-catalogues@unspecified",
"info": {
"name": ".",
"name": "version-catalogues",
"version": "unspecified"
}
},
Expand Down Expand Up @@ -38,7 +38,7 @@
"nodes": [
{
"nodeId": "root-node",
"pkgId": ".@unspecified",
"pkgId": "version-catalogues@unspecified",
"deps": [
{
"nodeId": "org.codehaus.groovy:[email protected]"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
},
"pkgs": [
{
"id": ".@unspecified",
"id": "version-catalog-toml@unspecified",
"info": {
"name": ".",
"name": "version-catalog-toml",
"version": "unspecified"
}
},
Expand Down Expand Up @@ -94,7 +94,7 @@
"nodes": [
{
"nodeId": "root-node",
"pkgId": ".@unspecified",
"pkgId": "version-catalog-toml@unspecified",
"deps": [
{
"nodeId": "org.mockito:[email protected]"
Expand Down
8 changes: 4 additions & 4 deletions test/fixtures-with-wrappers/with-lock-file/dep-graph.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
},
"pkgs": [
{
"id": ".@unspecified",
"id": "with-lock-file@unspecified",
"info": {
"name": ".",
"name": "with-lock-file",
"version": "unspecified"
}
},
Expand Down Expand Up @@ -73,7 +73,7 @@
"nodes": [
{
"nodeId": "root-node",
"pkgId": ".@unspecified",
"pkgId": "with-lock-file@unspecified",
"deps": [
{
"nodeId": "org.codehaus.groovy:[email protected]"
Expand Down Expand Up @@ -144,4 +144,4 @@
}
]
}
}
}
6 changes: 3 additions & 3 deletions test/fixtures/pruned-spring-app/dep-graph.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
},
"pkgs": [
{
"id": ".@unspecified",
"id": "pruned-spring-app@unspecified",
"info": {
"name": ".",
"name": "pruned-spring-app",
"version": "unspecified"
}
},
Expand Down Expand Up @@ -45,7 +45,7 @@
"nodes": [
{
"nodeId": "root-node",
"pkgId": ".@unspecified",
"pkgId": "pruned-spring-app@unspecified",
"deps": [
{
"nodeId": "org.springframework:[email protected]"
Expand Down
12 changes: 6 additions & 6 deletions test/manual/gradle-stdout.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ describe('findProjectsInExtractedJSON', () => {
const fakeRootDir = path.join('dev', 'tardis-master');

it.each`
rootDir | targetFile
${''} | ${'build.gradle'}
${null} | ${'build.gradle'}
${undefined} | ${'build.gradle'}
${fakeRootDir} | ${path.join(fakeRootDir, 'build.gradle')}
targetFile
${'build.gradle'}
${'build.gradle'}
${'build.gradle'}
${path.join(fakeRootDir, 'build.gradle')}
`(
'project with targetFile `$targetFile` have valid name when rootDir is `$rootDir`',
async ({ rootDir, targetFile }) => {
async ({ targetFile }) => {
const jsonExtractedFromGradleStdout = {
defaultProject: 'tardis-master',
defaultProjectKey: 'tardis-master',
Expand Down
2 changes: 1 addition & 1 deletion test/system/kotlin.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ if (isKotlinSupported) {
'.',
path.join(fixtureDir('gradle-kts'), 'build.gradle.kts'),
);
expect(result.dependencyGraph.rootPkg.name).toMatch('.');
expect(result.dependencyGraph.rootPkg.name).toMatch('gradle-kts');
expect(result.meta!.gradleProjectName).toMatch('gradle-kts');
const pkgs = result.dependencyGraph.getDepPkgs();
const nodeIds: string[] = [];
Expand Down
Loading

0 comments on commit c21d58c

Please sign in to comment.