You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

129 lines
2.6 KiB

  1. package rpctest
  2. import (
  3. _ "github.com/tendermint/tendermint/config/tendermint_test"
  4. "testing"
  5. )
  6. // When run with `-test.short` we only run:
  7. // TestHTTPStatus, TestHTTPBroadcast, TestJSONStatus, TestJSONBroadcast, TestWSConnect, TestWSSend
  8. //--------------------------------------------------------------------------------
  9. // Test the HTTP client
  10. func TestHTTPStatus(t *testing.T) {
  11. testStatus(t, "HTTP")
  12. }
  13. func TestHTTPGenPriv(t *testing.T) {
  14. if testing.Short() {
  15. t.Skip("skipping test in short mode.")
  16. }
  17. testGenPriv(t, "HTTP")
  18. }
  19. func TestHTTPGetAccount(t *testing.T) {
  20. if testing.Short() {
  21. t.Skip("skipping test in short mode.")
  22. }
  23. testGetAccount(t, "HTTP")
  24. }
  25. func TestHTTPSignedTx(t *testing.T) {
  26. if testing.Short() {
  27. t.Skip("skipping test in short mode.")
  28. }
  29. testSignedTx(t, "HTTP")
  30. }
  31. func TestHTTPBroadcastTx(t *testing.T) {
  32. testBroadcastTx(t, "HTTP")
  33. }
  34. func TestHTTPGetStorage(t *testing.T) {
  35. if testing.Short() {
  36. t.Skip("skipping test in short mode.")
  37. }
  38. testGetStorage(t, "HTTP")
  39. }
  40. func TestHTTPCallCode(t *testing.T) {
  41. if testing.Short() {
  42. t.Skip("skipping test in short mode.")
  43. }
  44. testCallCode(t, "HTTP")
  45. }
  46. func TestHTTPCallContract(t *testing.T) {
  47. if testing.Short() {
  48. t.Skip("skipping test in short mode.")
  49. }
  50. testCall(t, "HTTP")
  51. }
  52. func TestHTTPNameReg(t *testing.T) {
  53. if testing.Short() {
  54. t.Skip("skipping test in short mode.")
  55. }
  56. testNameReg(t, "HTTP")
  57. }
  58. //--------------------------------------------------------------------------------
  59. // Test the JSONRPC client
  60. func TestJSONStatus(t *testing.T) {
  61. testStatus(t, "JSONRPC")
  62. }
  63. func TestJSONGenPriv(t *testing.T) {
  64. if testing.Short() {
  65. t.Skip("skipping test in short mode.")
  66. }
  67. testGenPriv(t, "JSONRPC")
  68. }
  69. func TestJSONGetAccount(t *testing.T) {
  70. if testing.Short() {
  71. t.Skip("skipping test in short mode.")
  72. }
  73. testGetAccount(t, "JSONRPC")
  74. }
  75. func TestJSONSignedTx(t *testing.T) {
  76. if testing.Short() {
  77. t.Skip("skipping test in short mode.")
  78. }
  79. testSignedTx(t, "JSONRPC")
  80. }
  81. func TestJSONBroadcastTx(t *testing.T) {
  82. testBroadcastTx(t, "JSONRPC")
  83. }
  84. func TestJSONGetStorage(t *testing.T) {
  85. if testing.Short() {
  86. t.Skip("skipping test in short mode.")
  87. }
  88. testGetStorage(t, "JSONRPC")
  89. }
  90. func TestJSONCallCode(t *testing.T) {
  91. if testing.Short() {
  92. t.Skip("skipping test in short mode.")
  93. }
  94. testCallCode(t, "JSONRPC")
  95. }
  96. func TestJSONCallContract(t *testing.T) {
  97. if testing.Short() {
  98. t.Skip("skipping test in short mode.")
  99. }
  100. testCall(t, "JSONRPC")
  101. }
  102. func TestJSONNameReg(t *testing.T) {
  103. if testing.Short() {
  104. t.Skip("skipping test in short mode.")
  105. }
  106. testNameReg(t, "JSONRPC")
  107. }