-
Notifications
You must be signed in to change notification settings - Fork 807
Emit version in JSON format for --json-version #3129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
439e3c3
Emit version in JSON format for --json-version
maru-ava 4e8597c
fixup: Respond to review comments
maru-ava 9e23fbe
fixup: Add comment about Versions.Commit potentially being empty
maru-ava 7cbe3a5
fixup: Use println where no args are present
maru-ava ba17358
fixup: s/json-version/version-json/
maru-ava 57d5ff0
fixup: Move json marshaling with indent to main
maru-ava 71640cf
fixup: Change type of RPCChainVM
maru-ava c3ebb68
fixup: respond to review comments
maru-ava fe06b28
fixup: Moved to a more logical testing order
maru-ava 3f9aed0
fixup: Update docstring to reflect move of json marshaling
maru-ava File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// Copyright (C) 2019-2024, Ava Labs, Inc. All rights reserved. | ||
// See the file LICENSE for licensing terms. | ||
|
||
package version | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/stretchr/testify/require" | ||
) | ||
|
||
func TestVersionsGetString(t *testing.T) { | ||
StephenButtolph marked this conversation as resolved.
Show resolved
Hide resolved
|
||
versions := Versions{ | ||
Application: "1", | ||
Database: "2", | ||
RPCChainVM: 3, | ||
Commit: "4", | ||
Go: "5", | ||
} | ||
require.Equal(t, "1 [database=2, rpcchainvm=3, commit=4, go=5]", versions.String()) | ||
versions.Commit = "" | ||
require.Equal(t, "1 [database=2, rpcchainvm=3, go=5]", versions.String()) | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.