fix: kubo in AgentVersion

This commit is contained in:
Marcin Rataj 2022-07-06 20:39:44 +02:00
parent c9b8fbdbef
commit 4c965fc603
3 changed files with 5 additions and 5 deletions

View File

@ -16,7 +16,7 @@ test_id_compute_agent() {
else
AGENT_COMMIT="${AGENT_COMMIT##$AGENT_VERSION-}"
fi
AGENT_VERSION="go-ipfs/$AGENT_VERSION/$AGENT_COMMIT"
AGENT_VERSION="kubo/$AGENT_VERSION/$AGENT_COMMIT"
if test -n "$AGENT_SUFFIX"; then
if test -n "$AGENT_COMMIT"; then
AGENT_VERSION="$AGENT_VERSION/"

View File

@ -24,7 +24,7 @@ test_ls_cmd() {
printf "Access-Control-Allow-Headers: X-Stream-Output, X-Chunked-Output, X-Content-Length\r\n" >>expected_output &&
printf "Access-Control-Expose-Headers: X-Stream-Output, X-Chunked-Output, X-Content-Length\r\n" >>expected_output &&
printf "Content-Type: text/plain\r\n" >>expected_output &&
printf "Server: go-ipfs/%s\r\n" $(ipfs version -n) >>expected_output &&
printf "Server: kubo/%s\r\n" $(ipfs version -n) >>expected_output &&
printf "Trailer: X-Stream-Error\r\n" >>expected_output &&
printf "Vary: Origin\r\n" >>expected_output &&
printf "X-Chunked-Output: 1\r\n" >>expected_output &&
@ -47,7 +47,7 @@ test_ls_cmd() {
printf "Access-Control-Allow-Headers: X-Stream-Output, X-Chunked-Output, X-Content-Length\r\n" >>expected_output &&
printf "Access-Control-Expose-Headers: X-Stream-Output, X-Chunked-Output, X-Content-Length\r\n" >>expected_output &&
printf "Content-Type: application/json\r\n" >>expected_output &&
printf "Server: go-ipfs/%s\r\n" $(ipfs version -n) >>expected_output &&
printf "Server: kubo/%s\r\n" $(ipfs version -n) >>expected_output &&
printf "Trailer: X-Stream-Error\r\n" >>expected_output &&
printf "Vary: Origin\r\n" >>expected_output &&
printf "X-Chunked-Output: 1\r\n" >>expected_output &&

View File

@ -13,13 +13,13 @@ var CurrentCommit string
// CurrentVersionNumber is the current application's version literal
const CurrentVersionNumber = "0.14.0-dev"
const ApiVersion = "/go-ipfs/" + CurrentVersionNumber + "/"
const ApiVersion = "/kubo/" + CurrentVersionNumber + "/"
// GetUserAgentVersion is the libp2p user agent used by go-ipfs.
//
// Note: This will end in `/` when no commit is available. This is expected.
func GetUserAgentVersion() string {
userAgent := "go-ipfs/" + CurrentVersionNumber + "/" + CurrentCommit
userAgent := "kubo/" + CurrentVersionNumber + "/" + CurrentCommit
if userAgentSuffix != "" {
if CurrentCommit != "" {
userAgent += "/"