Skip to content

Commit

Permalink
comment out astroport test
Browse files Browse the repository at this point in the history
  • Loading branch information
rbajollari committed Mar 28, 2024
1 parent 954c356 commit a7ebb2e
Showing 1 changed file with 35 additions and 35 deletions.
70 changes: 35 additions & 35 deletions oracle/provider/astroport_test.go
Original file line number Diff line number Diff line change
@@ -1,41 +1,41 @@
package provider

import (
"context"
"os"
"testing"
"time"
// import (
// "context"
// "os"
// "testing"
// "time"

"github.com/ojo-network/price-feeder/oracle/types"
"github.com/rs/zerolog"
"github.com/stretchr/testify/require"
)
// "github.com/ojo-network/price-feeder/oracle/types"
// "github.com/rs/zerolog"
// "github.com/stretchr/testify/require"
// )

// TestAstroportProvider_GetTickers tests the polling process.
// TODO: Make this more comprehensive.
//
// Ref: https://github.com/ojo-network/price-feeder/issues/317
func TestAstroportProvider_GetTickers(t *testing.T) {
ctx := context.Background()
pairs := []types.CurrencyPair{{
Base: "STINJ",
Quote: "INJ",
}}
p, err := NewAstroportProvider(
ctx,
zerolog.New(os.Stdout).With().Timestamp().Logger(),
Endpoint{},
pairs...,
)
require.NoError(t, err)
availPairs, err := p.GetAvailablePairs()
require.NoError(t, err)
require.NotEmpty(t, availPairs)
// // TestAstroportProvider_GetTickers tests the polling process.
// // TODO: Make this more comprehensive.
// //
// // Ref: https://github.com/ojo-network/price-feeder/issues/317
// func TestAstroportProvider_GetTickers(t *testing.T) {
// ctx := context.Background()
// pairs := []types.CurrencyPair{{
// Base: "STINJ",
// Quote: "INJ",
// }}
// p, err := NewAstroportProvider(
// ctx,
// zerolog.New(os.Stdout).With().Timestamp().Logger(),
// Endpoint{},
// pairs...,
// )
// require.NoError(t, err)
// availPairs, err := p.GetAvailablePairs()
// require.NoError(t, err)
// require.NotEmpty(t, availPairs)

p.StartConnections()
time.Sleep(10 * time.Second)
// p.StartConnections()
// time.Sleep(10 * time.Second)

res, err := p.GetTickerPrices(pairs...)
require.NoError(t, err)
require.NotEmpty(t, res)
}
// res, err := p.GetTickerPrices(pairs...)
// require.NoError(t, err)
// require.NotEmpty(t, res)
// }

0 comments on commit a7ebb2e

Please sign in to comment.