Use testing.toml and vulcanize_testing in tests

- remove legacy references to infura.toml and vulcanize_private
This commit is contained in:
Rob Mulholand
2019-10-31 13:10:25 -05:00
parent 92650f0981
commit 234fff83c5
9 changed files with 27 additions and 57 deletions
+4 -4
View File
@@ -32,9 +32,9 @@ import (
var _ = Describe("Rewards calculations", func() {
It("calculates a block reward for a real block", func() {
rawRpcClient, err := rpc.Dial(test_config.InfuraClient.IPCPath)
rawRpcClient, err := rpc.Dial(test_config.TestClient.IPCPath)
Expect(err).NotTo(HaveOccurred())
rpcClient := client.NewRpcClient(rawRpcClient, test_config.InfuraClient.IPCPath)
rpcClient := client.NewRpcClient(rawRpcClient, test_config.TestClient.IPCPath)
ethClient := ethclient.NewClient(rawRpcClient)
blockChainClient := client.NewEthClient(ethClient)
node := node.MakeNode(rpcClient)
@@ -46,9 +46,9 @@ var _ = Describe("Rewards calculations", func() {
})
It("calculates an uncle reward for a real block", func() {
rawRpcClient, err := rpc.Dial(test_config.InfuraClient.IPCPath)
rawRpcClient, err := rpc.Dial(test_config.TestClient.IPCPath)
Expect(err).NotTo(HaveOccurred())
rpcClient := client.NewRpcClient(rawRpcClient, test_config.InfuraClient.IPCPath)
rpcClient := client.NewRpcClient(rawRpcClient, test_config.TestClient.IPCPath)
ethClient := ethclient.NewClient(rawRpcClient)
blockChainClient := client.NewEthClient(ethClient)
node := node.MakeNode(rpcClient)
+6 -6
View File
@@ -49,9 +49,9 @@ var _ = Describe("Reading contracts", func() {
},
Index: 19,
Data: "0x0000000000000000000000000000000000000000000000000c7d713b49da0000"}
rawRpcClient, err := rpc.Dial(test_config.InfuraClient.IPCPath)
rawRpcClient, err := rpc.Dial(test_config.TestClient.IPCPath)
Expect(err).NotTo(HaveOccurred())
rpcClient := client.NewRpcClient(rawRpcClient, test_config.InfuraClient.IPCPath)
rpcClient := client.NewRpcClient(rawRpcClient, test_config.TestClient.IPCPath)
ethClient := ethclient.NewClient(rawRpcClient)
blockChainClient := client.NewEthClient(ethClient)
node := node.MakeNode(rpcClient)
@@ -67,9 +67,9 @@ var _ = Describe("Reading contracts", func() {
})
It("returns and empty log array when no events for a given block / contract combo", func() {
rawRpcClient, err := rpc.Dial(test_config.InfuraClient.IPCPath)
rawRpcClient, err := rpc.Dial(test_config.TestClient.IPCPath)
Expect(err).NotTo(HaveOccurred())
rpcClient := client.NewRpcClient(rawRpcClient, test_config.InfuraClient.IPCPath)
rpcClient := client.NewRpcClient(rawRpcClient, test_config.TestClient.IPCPath)
ethClient := ethclient.NewClient(rawRpcClient)
blockChainClient := client.NewEthClient(ethClient)
node := node.MakeNode(rpcClient)
@@ -85,9 +85,9 @@ var _ = Describe("Reading contracts", func() {
Describe("Fetching Contract data", func() {
It("returns the correct attribute for a real contract", func() {
rawRpcClient, err := rpc.Dial(test_config.InfuraClient.IPCPath)
rawRpcClient, err := rpc.Dial(test_config.TestClient.IPCPath)
Expect(err).NotTo(HaveOccurred())
rpcClient := client.NewRpcClient(rawRpcClient, test_config.InfuraClient.IPCPath)
rpcClient := client.NewRpcClient(rawRpcClient, test_config.TestClient.IPCPath)
ethClient := ethclient.NewClient(rawRpcClient)
blockChainClient := client.NewEthClient(ethClient)
node := node.MakeNode(rpcClient)
+2 -2
View File
@@ -37,9 +37,9 @@ var _ = Describe("Reading from the Geth blockchain", func() {
var blockChain *eth.BlockChain
BeforeEach(func() {
rawRpcClient, err := rpc.Dial(test_config.InfuraClient.IPCPath)
rawRpcClient, err := rpc.Dial(test_config.TestClient.IPCPath)
Expect(err).NotTo(HaveOccurred())
rpcClient := client.NewRpcClient(rawRpcClient, test_config.InfuraClient.IPCPath)
rpcClient := client.NewRpcClient(rawRpcClient, test_config.TestClient.IPCPath)
ethClient := ethclient.NewClient(rawRpcClient)
blockChainClient := client.NewEthClient(ethClient)
node := node.MakeNode(rpcClient)