Skip to content

Commit

Permalink
fixup! Throw an error if Devfile from unsupported ssh repository is n…
Browse files Browse the repository at this point in the history
…ot resolved
  • Loading branch information
vinokurig committed Feb 18, 2025
1 parent 7b5be5f commit 319c595
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ public Optional<String> filename() {

@Override
public String location() {
return String.format("https://%s/%s/%s", hostName, repository, devfileFilename);
// TODO: throw exception. We do not know the location of the devfile.
return devfileFilename;
}
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public void shouldReturnDevfileLocations() throws Exception {
.withDevfileFilenames(Arrays.asList(devfileNames));
List<DevfileLocation> devfileLocations = sshUrl.devfileFileLocations();
assertEquals(devfileLocations.size(), 2);
assertEquals(devfileLocations.get(0).location(), "https://hostname/repository/devfile.yaml");
assertEquals(devfileLocations.get(1).location(), "https://hostname/repository/.devfile.yaml");
assertEquals(devfileLocations.get(0).location(), "devfile.yaml");
assertEquals(devfileLocations.get(1).location(), ".devfile.yaml");
}
}

0 comments on commit 319c595

Please sign in to comment.