Direct proxy fallthrough #132
2
.github/workflows/on-pr.yaml
vendored
2
.github/workflows/on-pr.yaml
vendored
@ -62,7 +62,7 @@ jobs:
|
|||||||
make integrationtest
|
make integrationtest
|
||||||
|
|
||||||
integrationtest_forwardethcalls:
|
integrationtest_forwardethcalls:
|
||||||
name: Run integration tests
|
name: Run integration tests for direct proxy fall-through of eth_calls
|
||||||
env:
|
env:
|
||||||
GOPATH: /tmp/go
|
GOPATH: /tmp/go
|
||||||
DB_WRITE: false
|
DB_WRITE: false
|
||||||
|
@ -20,9 +20,6 @@ import (
|
|||||||
var _ = Describe("Integration test", func() {
|
var _ = Describe("Integration test", func() {
|
||||||
directProxyEthCalls, err := strconv.ParseBool(os.Getenv("ETH_FORWARD_ETH_CALLS"))
|
directProxyEthCalls, err := strconv.ParseBool(os.Getenv("ETH_FORWARD_ETH_CALLS"))
|
||||||
Expect(err).To(BeNil())
|
Expect(err).To(BeNil())
|
||||||
if !directProxyEthCalls {
|
|
||||||
Skip("skipping direct-proxy-forwarding integration tests")
|
|
||||||
}
|
|
||||||
gethHttpPath := "http://127.0.0.1:8545"
|
gethHttpPath := "http://127.0.0.1:8545"
|
||||||
gethClient, err := ethclient.Dial(gethHttpPath)
|
gethClient, err := ethclient.Dial(gethHttpPath)
|
||||||
Expect(err).ToNot(HaveOccurred())
|
Expect(err).ToNot(HaveOccurred())
|
||||||
@ -43,6 +40,9 @@ var _ = Describe("Integration test", func() {
|
|||||||
|
|
||||||
Describe("get Block", func() {
|
Describe("get Block", func() {
|
||||||
BeforeEach(func() {
|
BeforeEach(func() {
|
||||||
|
if !directProxyEthCalls {
|
||||||
|
Skip("skipping direct-proxy-forwarding integration tests")
|
||||||
|
}
|
||||||
contract, contractErr = integration.DeployContract()
|
contract, contractErr = integration.DeployContract()
|
||||||
time.Sleep(sleepInterval)
|
time.Sleep(sleepInterval)
|
||||||
})
|
})
|
||||||
@ -94,6 +94,9 @@ var _ = Describe("Integration test", func() {
|
|||||||
|
|
||||||
Describe("Transaction", func() {
|
Describe("Transaction", func() {
|
||||||
BeforeEach(func() {
|
BeforeEach(func() {
|
||||||
|
if !directProxyEthCalls {
|
||||||
|
Skip("skipping direct-proxy-forwarding integration tests")
|
||||||
|
}
|
||||||
contract, contractErr = integration.DeployContract()
|
contract, contractErr = integration.DeployContract()
|
||||||
time.Sleep(sleepInterval)
|
time.Sleep(sleepInterval)
|
||||||
})
|
})
|
||||||
@ -119,6 +122,9 @@ var _ = Describe("Integration test", func() {
|
|||||||
|
|
||||||
Describe("Receipt", func() {
|
Describe("Receipt", func() {
|
||||||
BeforeEach(func() {
|
BeforeEach(func() {
|
||||||
|
if !directProxyEthCalls {
|
||||||
|
Skip("skipping direct-proxy-forwarding integration tests")
|
||||||
|
}
|
||||||
contract, contractErr = integration.DeployContract()
|
contract, contractErr = integration.DeployContract()
|
||||||
time.Sleep(sleepInterval)
|
time.Sleep(sleepInterval)
|
||||||
})
|
})
|
||||||
@ -136,6 +142,9 @@ var _ = Describe("Integration test", func() {
|
|||||||
|
|
||||||
Describe("FilterLogs", func() {
|
Describe("FilterLogs", func() {
|
||||||
BeforeEach(func() {
|
BeforeEach(func() {
|
||||||
|
if !directProxyEthCalls {
|
||||||
|
Skip("skipping direct-proxy-forwarding integration tests")
|
||||||
|
}
|
||||||
contract, contractErr = integration.DeployContract()
|
contract, contractErr = integration.DeployContract()
|
||||||
time.Sleep(sleepInterval)
|
time.Sleep(sleepInterval)
|
||||||
})
|
})
|
||||||
@ -160,6 +169,9 @@ var _ = Describe("Integration test", func() {
|
|||||||
|
|
||||||
Describe("CodeAt", func() {
|
Describe("CodeAt", func() {
|
||||||
BeforeEach(func() {
|
BeforeEach(func() {
|
||||||
|
if !directProxyEthCalls {
|
||||||
|
Skip("skipping direct-proxy-forwarding integration tests")
|
||||||
|
}
|
||||||
contract, contractErr = integration.DeployContract()
|
contract, contractErr = integration.DeployContract()
|
||||||
time.Sleep(sleepInterval)
|
time.Sleep(sleepInterval)
|
||||||
})
|
})
|
||||||
@ -207,6 +219,9 @@ var _ = Describe("Integration test", func() {
|
|||||||
Describe("Get balance", func() {
|
Describe("Get balance", func() {
|
||||||
address := "0x1111111111111111111111111111111111111112"
|
address := "0x1111111111111111111111111111111111111112"
|
||||||
BeforeEach(func() {
|
BeforeEach(func() {
|
||||||
|
if !directProxyEthCalls {
|
||||||
|
Skip("skipping direct-proxy-forwarding integration tests")
|
||||||
|
}
|
||||||
tx, txErr = integration.SendEth(address, "0.01")
|
tx, txErr = integration.SendEth(address, "0.01")
|
||||||
time.Sleep(sleepInterval)
|
time.Sleep(sleepInterval)
|
||||||
})
|
})
|
||||||
@ -270,6 +285,9 @@ var _ = Describe("Integration test", func() {
|
|||||||
|
|
||||||
Describe("Get Storage", func() {
|
Describe("Get Storage", func() {
|
||||||
BeforeEach(func() {
|
BeforeEach(func() {
|
||||||
|
if !directProxyEthCalls {
|
||||||
|
Skip("skipping direct-proxy-forwarding integration tests")
|
||||||
|
}
|
||||||
contract, contractErr = integration.DeployContract()
|
contract, contractErr = integration.DeployContract()
|
||||||
erc20TotalSupply, bigIntResult = new(big.Int).SetString("1000000000000000000000", 10)
|
erc20TotalSupply, bigIntResult = new(big.Int).SetString("1000000000000000000000", 10)
|
||||||
|
|
||||||
@ -383,6 +401,9 @@ var _ = Describe("Integration test", func() {
|
|||||||
|
|
||||||
Describe("eth call", func() {
|
Describe("eth call", func() {
|
||||||
BeforeEach(func() {
|
BeforeEach(func() {
|
||||||
|
if !directProxyEthCalls {
|
||||||
|
Skip("skipping direct-proxy-forwarding integration tests")
|
||||||
|
}
|
||||||
contract, contractErr = integration.DeployContract()
|
contract, contractErr = integration.DeployContract()
|
||||||
erc20TotalSupply, bigIntResult = new(big.Int).SetString("1000000000000000000000", 10)
|
erc20TotalSupply, bigIntResult = new(big.Int).SetString("1000000000000000000000", 10)
|
||||||
|
|
||||||
|
@ -31,9 +31,6 @@ var (
|
|||||||
var _ = Describe("Integration test", func() {
|
var _ = Describe("Integration test", func() {
|
||||||
directProxyEthCalls, err := strconv.ParseBool(os.Getenv("ETH_FORWARD_ETH_CALLS"))
|
directProxyEthCalls, err := strconv.ParseBool(os.Getenv("ETH_FORWARD_ETH_CALLS"))
|
||||||
Expect(err).To(BeNil())
|
Expect(err).To(BeNil())
|
||||||
if directProxyEthCalls {
|
|
||||||
Skip("skipping no-direct-proxy-forwarding integration tests")
|
|
||||||
}
|
|
||||||
gethHttpPath := "http://127.0.0.1:8545"
|
gethHttpPath := "http://127.0.0.1:8545"
|
||||||
gethClient, err := ethclient.Dial(gethHttpPath)
|
gethClient, err := ethclient.Dial(gethHttpPath)
|
||||||
Expect(err).ToNot(HaveOccurred())
|
Expect(err).ToNot(HaveOccurred())
|
||||||
@ -54,6 +51,9 @@ var _ = Describe("Integration test", func() {
|
|||||||
|
|
||||||
Describe("get Block", func() {
|
Describe("get Block", func() {
|
||||||
BeforeEach(func() {
|
BeforeEach(func() {
|
||||||
|
if directProxyEthCalls {
|
||||||
|
Skip("skipping no-direct-proxy-forwarding integration tests")
|
||||||
|
}
|
||||||
contract, contractErr = integration.DeployContract()
|
contract, contractErr = integration.DeployContract()
|
||||||
time.Sleep(sleepInterval)
|
time.Sleep(sleepInterval)
|
||||||
})
|
})
|
||||||
@ -123,6 +123,9 @@ var _ = Describe("Integration test", func() {
|
|||||||
|
|
||||||
Describe("Transaction", func() {
|
Describe("Transaction", func() {
|
||||||
BeforeEach(func() {
|
BeforeEach(func() {
|
||||||
|
if directProxyEthCalls {
|
||||||
|
Skip("skipping no-direct-proxy-forwarding integration tests")
|
||||||
|
}
|
||||||
contract, contractErr = integration.DeployContract()
|
contract, contractErr = integration.DeployContract()
|
||||||
time.Sleep(sleepInterval)
|
time.Sleep(sleepInterval)
|
||||||
})
|
})
|
||||||
@ -154,6 +157,9 @@ var _ = Describe("Integration test", func() {
|
|||||||
|
|
||||||
Describe("Receipt", func() {
|
Describe("Receipt", func() {
|
||||||
BeforeEach(func() {
|
BeforeEach(func() {
|
||||||
|
if directProxyEthCalls {
|
||||||
|
Skip("skipping no-direct-proxy-forwarding integration tests")
|
||||||
|
}
|
||||||
contract, contractErr = integration.DeployContract()
|
contract, contractErr = integration.DeployContract()
|
||||||
time.Sleep(sleepInterval)
|
time.Sleep(sleepInterval)
|
||||||
})
|
})
|
||||||
@ -181,6 +187,9 @@ var _ = Describe("Integration test", func() {
|
|||||||
|
|
||||||
Describe("FilterLogs", func() {
|
Describe("FilterLogs", func() {
|
||||||
BeforeEach(func() {
|
BeforeEach(func() {
|
||||||
|
if directProxyEthCalls {
|
||||||
|
Skip("skipping no-direct-proxy-forwarding integration tests")
|
||||||
|
}
|
||||||
contract, contractErr = integration.DeployContract()
|
contract, contractErr = integration.DeployContract()
|
||||||
time.Sleep(sleepInterval)
|
time.Sleep(sleepInterval)
|
||||||
})
|
})
|
||||||
@ -211,6 +220,9 @@ var _ = Describe("Integration test", func() {
|
|||||||
|
|
||||||
Describe("CodeAt", func() {
|
Describe("CodeAt", func() {
|
||||||
BeforeEach(func() {
|
BeforeEach(func() {
|
||||||
|
if directProxyEthCalls {
|
||||||
|
Skip("skipping no-direct-proxy-forwarding integration tests")
|
||||||
|
}
|
||||||
contract, contractErr = integration.DeployContract()
|
contract, contractErr = integration.DeployContract()
|
||||||
time.Sleep(sleepInterval)
|
time.Sleep(sleepInterval)
|
||||||
})
|
})
|
||||||
@ -258,6 +270,9 @@ var _ = Describe("Integration test", func() {
|
|||||||
Describe("Get balance", func() {
|
Describe("Get balance", func() {
|
||||||
address := "0x1111111111111111111111111111111111111112"
|
address := "0x1111111111111111111111111111111111111112"
|
||||||
BeforeEach(func() {
|
BeforeEach(func() {
|
||||||
|
if directProxyEthCalls {
|
||||||
|
Skip("skipping no-direct-proxy-forwarding integration tests")
|
||||||
|
}
|
||||||
tx, txErr = integration.SendEth(address, "0.01")
|
tx, txErr = integration.SendEth(address, "0.01")
|
||||||
time.Sleep(sleepInterval)
|
time.Sleep(sleepInterval)
|
||||||
})
|
})
|
||||||
@ -321,6 +336,9 @@ var _ = Describe("Integration test", func() {
|
|||||||
|
|
||||||
Describe("Get Storage", func() {
|
Describe("Get Storage", func() {
|
||||||
BeforeEach(func() {
|
BeforeEach(func() {
|
||||||
|
if directProxyEthCalls {
|
||||||
|
Skip("skipping no-direct-proxy-forwarding integration tests")
|
||||||
|
}
|
||||||
contract, contractErr = integration.DeployContract()
|
contract, contractErr = integration.DeployContract()
|
||||||
erc20TotalSupply, bigIntResult = new(big.Int).SetString("1000000000000000000000", 10)
|
erc20TotalSupply, bigIntResult = new(big.Int).SetString("1000000000000000000000", 10)
|
||||||
|
|
||||||
@ -434,6 +452,9 @@ var _ = Describe("Integration test", func() {
|
|||||||
|
|
||||||
Describe("eth call", func() {
|
Describe("eth call", func() {
|
||||||
BeforeEach(func() {
|
BeforeEach(func() {
|
||||||
|
if directProxyEthCalls {
|
||||||
|
Skip("skipping no-direct-proxy-forwarding integration tests")
|
||||||
|
}
|
||||||
contract, contractErr = integration.DeployContract()
|
contract, contractErr = integration.DeployContract()
|
||||||
erc20TotalSupply, bigIntResult = new(big.Int).SetString("1000000000000000000000", 10)
|
erc20TotalSupply, bigIntResult = new(big.Int).SetString("1000000000000000000000", 10)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user