Skip to content

How to use devportal to perform smoketest on STEEM APIs

Anthony Martin edited this page Oct 15, 2018 · 2 revisions

As mentioned in the main README.md, the devportal has some tests:

https://github.com/steemit/devportal#tests

The primary use for these tests is to ensure that the curl examples are correct. Assuming they are, these tests can be used to verify the API works as expected (smoketests).

Setup

If you want to use your system version of ruby, skip to install steps.

Ubuntu

$ sudo apt-get install gnupg

macOS

$ brew install gpg

Installing ruby with rvm

Next, get on an isolated version of ruby.

$ command curl -sSL https://rvm.io/mpapis.asc | gpg --import -
$ curl -sSL https://get.rvm.io | bash -s stable
$ source ~/.rvm/scripts/rvm
$ rvm install ruby-2.4.2

Install

Once you have an isolated ruby environment, you can install devportal.

$ mkdir -p ~/src
$ cd ~/src
$ git clone https://github.com/steemit/devportal
$ cd devportal
$ gem install bundler
$ bundle install
$ bundle exec rake test:curl[condenser_api] && echo LGTM || echo bummer

You can also try different API hosts:

$ export TEST_NODE=https://testnet.steemitdev.com
$ bundle exec rake test:curl[condenser_api] && echo LGTM || echo bummer
Clone this wiki locally