Skip to content

Commit

Permalink
pass in env var
Browse files Browse the repository at this point in the history
  • Loading branch information
mvid committed Nov 19, 2021
1 parent 2e3284e commit 1b241da
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 5 deletions.
Empty file added .env.example
Empty file.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,6 @@ cache
artifacts
!integration_tests/ethereum/artifacts
*.test

# don't save the env file
.env
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,6 @@ e2e_clean_slate:
@cd integration_tests && go test -c

e2e_basic: e2e_clean_slate
@E2E_SKIP_CLEANUP=true
@integration_tests/integration_tests.test -test.run TestBasicChain -test.failfast -test.v || make -s fail

e2e_rebalance: e2e_clean_slate
Expand Down
7 changes: 4 additions & 3 deletions integration_tests/ethereum/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM node:14-alpine3.13

RUN apk update
RUN apk add --no-cache git python
RUN apk add --no-cache git python3

COPY package.json package.json
COPY yarn.lock yarn.lock
Expand All @@ -11,8 +11,9 @@ RUN npm config set user 0

COPY . .

RUN yarn run compile

ENV ARCHIVE_NODE_URL=""
EXPOSE 8545

RUN yarn run compile

CMD yarn start
4 changes: 3 additions & 1 deletion integration_tests/ethereum/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,13 @@ task(
/**
* @type import('hardhat/config').HardhatUserConfig
*/
const ARCHIVE_NODE_URL = process.env.ARCHIVE_NODE_URL;

module.exports = {
networks: {
hardhat: {
forking: {
url: 'https://eth-mainnet.alchemyapi.io/v2/lErlJJCjh4o6eXRbSXel1jVcBmCvAJfx',
url: ARCHIVE_NODE_URL,
blockNumber: 13405367,
},
},
Expand Down
1 change: 1 addition & 0 deletions integration_tests/setup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,7 @@ func (s *IntegrationTestSuite) runEthContainer() {
"8545/tcp": {{HostIP: "", HostPort: "8545"}},
},
ExposedPorts: []string{"8545/tcp"},
Env: []string{fmt.Sprintf("ARCHIVE_NODE_URL=%s", os.Getenv("ARCHIVE_NODE_URL"))},
}

s.ethResource, err = s.dockerPool.RunWithOptions(
Expand Down

0 comments on commit 1b241da

Please sign in to comment.