-
Notifications
You must be signed in to change notification settings - Fork 112
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'development' into feat/k/btree-scale
- Loading branch information
Showing
263 changed files
with
4,606 additions
and
3,097 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# CODEOWNERS: https://help.github.com/articles/about-codeowners/ | ||
|
||
# Primary repo maintainers | ||
* @edwardmack @timwu20 @EclesioMeloJunior @jimjbrettj @kishansagathiya @dimartiro @kanishkatn | ||
* @edwardmack @timwu20 @EclesioMeloJunior @jimjbrettj @kishansagathiya @dimartiro @kanishkatn @axaysagathiya |
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
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
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
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
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
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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,57 @@ | ||
// Copyright 2023 ChainSafe Systems (ON) | ||
// SPDX-License-Identifier: LGPL-3.0-only | ||
|
||
package commands | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/stretchr/testify/assert" | ||
"github.com/stretchr/testify/require" | ||
) | ||
|
||
func TestImportStateMissingStateFile(t *testing.T) { | ||
rootCmd, err := NewRootCommand() | ||
require.NoError(t, err) | ||
rootCmd.AddCommand(ImportStateCmd) | ||
|
||
rootCmd.SetArgs([]string{ImportStateCmd.Name()}) | ||
err = rootCmd.Execute() | ||
assert.ErrorContains(t, err, "state-file must be specified") | ||
} | ||
|
||
func TestImportStateInvalidFirstSlot(t *testing.T) { | ||
rootCmd, err := NewRootCommand() | ||
require.NoError(t, err) | ||
rootCmd.AddCommand(ImportStateCmd) | ||
|
||
rootCmd.SetArgs([]string{ImportStateCmd.Name(), "--first-slot", "wrong"}) | ||
err = rootCmd.Execute() | ||
assert.ErrorContains(t, err, "invalid argument \"wrong\"") | ||
} | ||
|
||
func TestImportStateEmptyHeaderFile(t *testing.T) { | ||
rootCmd, err := NewRootCommand() | ||
require.NoError(t, err) | ||
rootCmd.AddCommand(ImportStateCmd) | ||
|
||
rootCmd.SetArgs([]string{ImportStateCmd.Name(), | ||
"--state-file", "test", | ||
"--header-file", "", | ||
}) | ||
err = rootCmd.Execute() | ||
assert.ErrorContains(t, err, "header-file must be specified") | ||
} | ||
|
||
func TestImportStateErrorImportingState(t *testing.T) { | ||
rootCmd, err := NewRootCommand() | ||
require.NoError(t, err) | ||
rootCmd.AddCommand(ImportStateCmd) | ||
|
||
rootCmd.SetArgs([]string{ImportStateCmd.Name(), | ||
"--state-file", "test", | ||
"--header-file", "test", | ||
}) | ||
err = rootCmd.Execute() | ||
assert.ErrorContains(t, err, "no such file or directory") | ||
} |
Oops, something went wrong.