Skip to content
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

fix tests pkg and rename to devnet #395

Merged
merged 2 commits into from
Oct 5, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion account/account_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ import (
"github.com/joho/godotenv"

"github.com/NethermindEth/starknet.go/account"
test "github.com/NethermindEth/starknet.go/devnet"
"github.com/NethermindEth/starknet.go/mocks"
"github.com/NethermindEth/starknet.go/rpc"
"github.com/NethermindEth/starknet.go/test"
"github.com/NethermindEth/starknet.go/utils"
"github.com/golang/mock/gomock"
"github.com/test-go/testify/require"
Expand Down
1 change: 0 additions & 1 deletion test/devnet.go → devnet/devnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ func (devnet *DevNet) api(uri string) string {
func (devnet *DevNet) Accounts() ([]TestAccount, error) {
req, err := http.NewRequest(http.MethodGet, devnet.api("/predeployed_accounts"), nil)
if err != nil {

return nil, err
}
client := &http.Client{}
Expand Down
File renamed without changes.
28 changes: 28 additions & 0 deletions devnet/main_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
package test

import (
"flag"
"os"
"testing"
)

const (
DevNetETHAddress = "0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7"
)

// testConfiguration is a type that is used to configure tests
type testConfiguration struct {
base string
}

var (
// set the environment for the test, default: devnet
testEnv = "devnet"
)

// TestMain is used to trigger the tests and, in that case, check for the environment to use.
func TestMain(m *testing.M) {
flag.StringVar(&testEnv, "env", "devnet", "set the test environment")
flag.Parse()
os.Exit(m.Run())
}
33 changes: 0 additions & 33 deletions test/main_test.go

This file was deleted.

Loading