Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Wyverald committed Jan 28, 2025
1 parent c37e8a3 commit f176f33
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -898,7 +898,7 @@ public void labels_passedOnToRepoRule() throws Exception {
SkyKey extensionSkyKey =
SingleExtensionValue.key(
ModuleExtensionId.create(
Label.parseCanonicalUnchecked("@@ext+//:defs.bzl"), "ext", Optional.empty()));
Label.parseCanonicalUnchecked("@@ext~//:defs.bzl"), "ext", Optional.empty()));
EvaluationResult<SingleExtensionValue> extensionResult =
evaluator.evaluate(ImmutableList.of(extensionSkyKey), evaluationContext);
if (extensionResult.hasError()) {
Expand All @@ -911,7 +911,7 @@ public void labels_passedOnToRepoRule() throws Exception {
.get()
.moduleExtension()
.getRecordedRepoMappingEntries())
.containsCell(RepositoryName.create("foo+"), "bar", RepositoryName.create("bar+"));
.containsCell(RepositoryName.create("foo~"), "bar", RepositoryName.create("bar~"));
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ public void basic() throws Exception {
Label.parseCanonical("@@bar~//:pom.xml")));

assertThat(repoMappingRecorder.recordedEntries())
.containsCell(RepositoryName.create("foo+"), "bar", RepositoryName.create("bar+"));
.containsCell(RepositoryName.create("foo~"), "bar", RepositoryName.create("bar~"));
}

@Test
Expand Down
4 changes: 2 additions & 2 deletions src/test/py/bazel/bzlmod/bazel_lockfile_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -1950,7 +1950,7 @@ def testExtensionRepoMappingChange_tag(self):
_, _, stderr = self.RunBazel(['build', ':lol'])
stderr = '\n'.join(stderr)
self.assertIn('ran the extension!', stderr)
self.assertIn('STR=@@bar+//:lib_foo', stderr)
self.assertIn('STR=@@bar~//:lib_foo', stderr)

# Shutdown bazel to make sure we rely on the lockfile and not skyframe
self.RunBazel(['shutdown'])
Expand All @@ -1970,7 +1970,7 @@ def testExtensionRepoMappingChange_tag(self):
_, _, stderr = self.RunBazel(['build', ':lol'])
stderr = '\n'.join(stderr)
self.assertNotIn('ran the extension!', stderr)
self.assertIn('STR=@@bar+//:lib_foo', stderr)
self.assertIn('STR=@@bar~//:lib_foo', stderr)

def testExtensionRepoMappingChange_loadsAndRepoRelativeLabels(self):
# Regression test for #20721; same test as above, except that the call to
Expand Down

0 comments on commit f176f33

Please sign in to comment.