Skip to content

Commit

Permalink
chore(Bazel): replace the test done by BazelTest by a functional test
Browse files Browse the repository at this point in the history
Please note that no information could be found for the `glog` module
because of #8801.

Signed-off-by: Nicolas Nobelis <[email protected]>
  • Loading branch information
nnobelis committed Jul 24, 2024
1 parent b33b19a commit fef2414
Show file tree
Hide file tree
Showing 3 changed files with 117 additions and 46 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
---
project:
id: "Bazel::plugins/package-managers/bazel/src/funTest/assets/projects/synthetic/bazel-local-registry/MODULE.bazel:"
definition_file_path: "<REPLACE_DEFINITION_FILE_PATH>"
declared_licenses: []
declared_licenses_processed: {}
vcs:
type: "Git"
url: "<REPLACE_URL_PROCESSED>"
revision: "<REPLACE_REVISION>"
path: "<REPLACE_PATH>"
vcs_processed:
type: "Git"
url: "<REPLACE_URL_PROCESSED>"
revision: "<REPLACE_REVISION>"
path: "<REPLACE_PATH>"
homepage_url: ""
scopes:
- name: "dev"
dependencies: []
- name: "main"
dependencies:
- id: "Bazel::glog:0.5.0"
linkage: "STATIC"
dependencies:
- id: "Bazel::gflags:2.2.2"
linkage: "STATIC"
- id: "Bazel::test_module:0.0.1"
linkage: "STATIC"
packages:
- id: "Bazel::gflags:2.2.2"
purl: "pkg:generic/[email protected]"
declared_licenses: []
declared_licenses_processed: {}
description: ""
homepage_url: ""
binary_artifact:
url: ""
hash:
value: ""
algorithm: ""
source_artifact:
url: ""
hash:
value: ""
algorithm: ""
vcs:
type: ""
url: ""
revision: ""
path: ""
vcs_processed:
type: ""
url: ""
revision: ""
path: ""
- id: "Bazel::glog:0.5.0"
purl: "pkg:generic/[email protected]"
declared_licenses: []
declared_licenses_processed: {}
description: ""
homepage_url: ""
binary_artifact:
url: ""
hash:
value: ""
algorithm: ""
source_artifact:
url: ""
hash:
value: ""
algorithm: ""
vcs:
type: ""
url: ""
revision: ""
path: ""
vcs_processed:
type: ""
url: ""
revision: ""
path: ""
- id: "Bazel::test_module:0.0.1"
purl: "pkg:generic/[email protected]"
declared_licenses: []
declared_licenses_processed: {}
description: ""
homepage_url: ""
binary_artifact:
url: ""
hash:
value: ""
algorithm: ""
source_artifact:
url: "https://example.com/test_module-0.0.1.zip"
hash:
value: "562c4be7507dc6fb4997ecd648bf935d84efe17b54715fa5cfbddac05279f668"
algorithm: "SHA-256"
vcs:
type: "Git"
url: ""
revision: ""
path: ""
vcs_processed:
type: "Git"
url: ""
revision: ""
path: ""
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,13 @@ class BazelFunTest : StringSpec({

result.toYaml() should matchExpectedResult(expectedResultFile, definitionFile)
}

"Dependencies are detected correctly for a project with a local registries" {
val definitionFile = getAssetFile("projects/synthetic/bazel-local-registry/MODULE.bazel")
val expectedResultFile = getAssetFile("projects/synthetic/bazel-expected-output-local-registry.yml")

val result = create("Bazel").resolveSingleProject(definitionFile)

result.toYaml() should matchExpectedResult(expectedResultFile, definitionFile)
}
})
46 changes: 0 additions & 46 deletions plugins/package-managers/bazel/src/test/kotlin/BazelTest.kt

This file was deleted.

0 comments on commit fef2414

Please sign in to comment.