test-cli: refactor currencyservice smoke test
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
This commit is contained in:
parent
1c00f04e1e
commit
5b3530c021
1 changed files with 8 additions and 7 deletions
|
@ -270,17 +270,18 @@ func testCurrencyService() error {
|
|||
log.Printf("--> %v", listResp.GetCurrencyCodes())
|
||||
|
||||
log.Println("--- rpc Convert()")
|
||||
convertResp, err := cl.Convert(context.TODO(), &pb.CurrencyConversionRequest{
|
||||
From: &pb.Money{
|
||||
in := &pb.Money{
|
||||
CurrencyCode: "CAD",
|
||||
Amount: &pb.MoneyAmount{
|
||||
Decimal: 12,
|
||||
Fractional: 25},
|
||||
},
|
||||
}
|
||||
convertResp, err := cl.Convert(context.TODO(), &pb.CurrencyConversionRequest{
|
||||
From: in,
|
||||
ToCode: "USD"})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
log.Printf("--> result: %+v", convertResp)
|
||||
log.Printf("--> in=%v result(USD): %+v", in, convertResp)
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue