-
Notifications
You must be signed in to change notification settings - Fork 69
Description
proxy/get_version.t: failed
--- tests/proxy/get_version.t
+++ tests/proxy/get_version.t.err
@@ -2,7 +2,7 @@
$ cd ${TESTTMP}
$ curl -s http://localhost:8002/version
- Version: *.*.* (glob)
+ Version: 3da0ae7
$ bash ${TESTDIR}/destroy_test_env.sh
.The code is testing the /version endpoint...
josh/josh-proxy/src/bin/josh-proxy.rs
Lines 319 to 321 in c778c0e
| if path == "/version" { | |
| return Ok(Some(make_response( | |
| hyper::Body::from(version_str()), |
josh/josh-proxy/src/bin/josh-proxy.rs
Lines 35 to 36 in c778c0e
| fn version_str() -> String { | |
| format!("Version: {}\n", josh::VERSION,) |
Lines 81 to 82 in c778c0e
| /// 1. If in a git checkout, and `git` binary is present, use the | |
| /// commit ID or nearest tag. |
Lines 89 to 93 in c778c0e
| pub const VERSION: &str = git_version::git_version!( | |
| args = ["--tags", "--always", "--dirty=-modified"], | |
| fallback = match option_env!("JOSH_VERSION") { | |
| Some(v) => v, | |
| None => "unknown", |
There are a number of cases where the outcome will not match this pattern...
Certainly, anyone who forks this repository with github's defaults of only cloning the default branch won't have any tags. And if they enable actions and then pull in an updated master, their build would fail. (In my case, I forced the issue by pushing something else to master because I'm testing things, but the same would happen as outlined.)