-
Notifications
You must be signed in to change notification settings - Fork 11
feat(interact): implement simple interact #17
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
base: main
Are you sure you want to change the base?
feat(interact): implement simple interact #17
Conversation
junha1
left a comment
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.
CI에도 config 전달을 해줘야 할 것 같네요.
| tokio = { version = "1.0", features = ["full"] } | ||
| futures = "0.3" | ||
| reqwest = "0.11" | ||
| reqwest = { version = "0.11", features = ["json"] } |
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.
무관한 커밋에 들어있습니다.
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 3497363
interact/tests/suite1.rs
Outdated
|
|
||
| let first_json = first_res.json::<Value>().await.unwrap(); | ||
|
|
||
| thread::sleep(time::Duration::from_secs(2)); |
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.
async 함수에서는 https://docs.rs/tokio/latest/tokio/time/fn.sleep.html 를 씁시다.
| #[tokio::test] | ||
| #[ignore] | ||
| async fn check_account() { | ||
| let _config = Config::read_from_env(); |
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.
ditto.
interact/tests/suite1.rs
Outdated
| #[tokio::test] | ||
| #[ignore] | ||
| async fn check_connection() { | ||
| let _config = Config::read_from_env(); |
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.
변수명 앞에 _를 붙이는건 이 변수가 당장 안쓰인다는 것을 인지하고 있다는걸 알려주는 특수 린팅 규칙입니다. 이제 사용하니까 떼면 돼요.
| #[tokio::test] | ||
| #[ignore] | ||
| async fn check_block_number() { | ||
| let _config = Config::read_from_env(); |
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.
ditto.
| .unwrap(); | ||
|
|
||
| let json = res.json::<Value>().await.unwrap(); | ||
| assert_eq!(json["error"], Value::Null); |
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.
has enough native token to pay gas fee 에 대한 테스트 내용이 없는 것 같네요.
ad68263 to
3497363
Compare
|
CI config 전달에 대해 좋은 아이디어 받습니다
현재의 목적이 각 테스트마다 다른 환경변수를 넣어준다거나 그런것이 목적이라면, 1,2,3 영 아닌거 같은데 좋은 의견 있으신가요 |
|
@happyhappy-jun 그냥 CI에서 사용할 env파일을 지금처럼 repo 어딘가에 두고 그대로 쓰는게 제일 간단할 것 같습니다. 만약에 컨트랙트를 테스트넷에 재배포한다거나 하면 주소가 바뀔테니 적절히 업데이트 해주고요. |
7daaa74 to
fa4e428
Compare
cc42fca to
fab612f
Compare
Type of this PR
Describe your changes
reqwest를 사용해 json rpc 형태로 리퀘스트를 노드로 날립니다.serde_json으로 파싱합니다.Issue ticket number and other helpful resource
#1
Checklist before requesting a review
Checklist after creating a pull request