-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #23 from make-software/hotfix/day_ttl
Fix 1day TTL for deploy header
- Loading branch information
Showing
4 changed files
with
44 additions
and
4 deletions.
There are no files selected for viewing
This file contains 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,9 @@ | ||
{ | ||
"account": "01226a34b8cbcc24b8a3b758d710010dff63bb6f3b278222f33c294c8e1d6a9e25", | ||
"timestamp": "2021-05-11T12:10:58.754Z", | ||
"ttl": "1day", | ||
"gas_price": 1, | ||
"body_hash": "efcbe01ef3a2d9825d99b5a3c5c3dcc574a7c60c5152de39e03e3aeb29aa4400", | ||
"dependencies": [], | ||
"chain_name": "casper-test" | ||
} |
This file contains 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 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,21 @@ | ||
package types | ||
|
||
import ( | ||
"encoding/json" | ||
"testing" | ||
|
||
"github.com/stretchr/testify/assert" | ||
"github.com/stretchr/testify/require" | ||
|
||
"github.com/make-software/casper-go-sdk/types" | ||
) | ||
|
||
func Test_DurationUnmarshal_withSpace_shouldBeParsed(t *testing.T) { | ||
value := `"2h 46m 40s"` | ||
var result types.Duration | ||
err := json.Unmarshal([]byte(value), &result) | ||
require.NoError(t, err) | ||
data, err := result.MarshalJSON() | ||
require.NoError(t, err) | ||
assert.Equal(t, `"2h46m40s"`, string(data)) | ||
} |
This file contains 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