-
Notifications
You must be signed in to change notification settings - Fork 116
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
integration tests: don't hardcode testnet constant values #2164
integration tests: don't hardcode testnet constant values #2164
Conversation
✅ Deploy Preview for taquito-test-dapp ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
I am not sure about the suggested changes, because the tests can be run using a different RPC URL. The second option (network_type: Testnet | Sandbox) might be more appropriate. |
82014df
to
55e4b4d
Compare
Hi, sorry for the slow update. I've implemented what you suggested above, but I had to do some refactoring to simplify the change. What do you think? |
55e4b4d
to
918ac08
Compare
Thank you @arvidj ! |
await setup(true); | ||
|
||
writeOutput("import { KnownContracts } from './known-contracts';") | ||
appendOutput("export const knownContracts" + protocolShort + "KnownContracts = {"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think KnownContracts
should not be part of the string.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pushed a new version, which should fix this. The intention was to concatenate the type annotation, i.e. + ": KnownContracts"
but the colon got lost. Should be fixed now.
a36de2c
to
1f0dd60
Compare
integration-tests/config.ts
Outdated
const limanetEphemeral: Config = | ||
defaultConfig({ | ||
networkName: 'LIMANET', | ||
protocol: Protocols.PtJakart2, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrong protocol hash -> should be lima, not jakarta
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in the latest version.
1f0dd60
to
aa300d9
Compare
I've lost a commit in the rebase, hang on. |
a8d5ea7
to
ba33521
Compare
There are failures in the flextesa jobs for the "originate-known-contracts" step: |
const operation = await tezos.contract.originate(contractOriginateParams); | ||
const contract = await operation.contract(); | ||
console.log(`known ${contractName} address: ${contract.address}`); | ||
console.log(`::set-output ${contractName}::${contract.address}\n`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This ::set-output
command needs a name
parameter to fix the issue mentioned in #2164 (comment)
Yes either way will work. We need to dynamically originate and pass these contract addresses to the Mondaynet integration test job because the network is reset every week. |
Yes, we have two ways of doing the same thing, maybe we should only keep one of them. |
ba33521
to
dcd2a23
Compare
In the latest version, I've restored the format of the
I can't validate it further though. Guess we'll have to run the flextesa tests? I also noticed that It doesn't seem to hard adopting to the new workflow. I could have Preferably in a follow-up PR though :) |
dcd2a23
to
66f5b28
Compare
66f5b28
to
ae30caa
Compare
ae30caa
to
76f3d85
Compare
76f3d85
to
046c852
Compare
Hi @arvidj, alternatively could you rebase it and we can merge into another branch that can be finalized |
Sure, just tell me what I need to do. Sorry for the slow response. |
Hi @arvidj, |
046c852
to
27befe5
Compare
Hi, sorry for the delay. I just pushed a rebased version. |
This enables the distinction between 'real' test networks, such as Jakartanet, and locally spawned sandbox networks.
27befe5
to
47d4beb
Compare
@dsawali I just rebased, could you have a look? |
) * integration-tests: refactor knownContracts configuration * integration-tests: refactor config.ts * integration-tests: add [NetworkType] configuration parameter This enables the distinction between 'real' test networks, such as Jakartanet, and locally spawned sandbox networks. * integration-tests: only run [rpc-get-protocol-constants] in testnet Co-authored-by: arvidj <[email protected]>
Fixes #2163
This is quite a hacky solution, where the values are only checked if they match an actual RPC endpoint. This means that RPC endpoints have to be updated in two places when they change.
Another possible solution: include a key in the test configurations
configuration.ts::Config
liketestnet: boolean
ornetwork_type: Testnet | Sandbox
.Release Note Draft Snippet
If relevant, please write a summary of your change that will be suitable for
inclusion in the Release Notes for the next Taquito release.