tile38/tests
Josh Baker 16055ff745
Merge pull request #743 from iwpnd/fix/whereins
fix: whereins defaulting to lower case
2024-06-03 19:38:33 -07:00
..
107 Use struct for server options 2021-09-06 08:55:13 -07:00
616 Update btree/buntdb 2021-07-31 07:42:58 -07:00
README.md chore: fix some typos in comments 2024-04-11 11:16:44 +08:00
aof_legacy Better AOFMIGRATE tests 2022-09-27 10:06:47 -07:00
aof_test.go Better AOFMIGRATE tests 2022-09-27 10:06:47 -07:00
client_test.go Allow enough time for client to connect 2022-11-22 07:50:45 -07:00
fence_roaming_test.go wip - better tests 2022-09-23 07:30:03 -07:00
fence_test.go Replace out old style atomics 2022-11-03 10:07:17 -07:00
follower_test.go Better FOLLOW/MONITOR tests 2022-09-27 14:06:24 -07:00
json_test.go Parallel integration tests 2022-09-26 13:26:46 -07:00
keys_search_test.go Parallel integration tests 2022-09-26 13:26:46 -07:00
keys_test.go Merge pull request #743 from iwpnd/fix/whereins 2024-06-03 19:38:33 -07:00
metrics_test.go Parallel integration tests 2022-09-26 13:26:46 -07:00
mock_io_test.go Better CLIENT tests 2022-09-24 13:41:36 -07:00
mock_test.go Replace out old style atomics 2022-11-03 10:07:17 -07:00
monitor_test.go Better FOLLOW/MONITOR tests 2022-09-27 14:06:24 -07:00
proto_test.go Access-Control-Allow-Headers is apparently required by the spec 2024-05-06 22:07:07 -07:00
scripts_test.go fix: set package module to nil in lua namespace; prevents calling loaders 2022-11-09 13:50:43 -08:00
stats_test.go Parallel integration tests 2022-09-26 13:26:46 -07:00
testcmd_test.go Better TEST tests 2022-09-27 08:18:17 -07:00
tests_test.go Add tests 2024-05-06 21:59:32 -07:00
timeout_test.go Parallel integration tests 2022-09-26 13:26:46 -07:00

README.md

Tile38 Integration Testing

  • Uses Redis protocol
  • The Tile38 data is flushed before every DoBatch

A basic test operation looks something like:

func keys_SET_test(mc *mockServer) error {
	return mc.DoBatch([][]interface{}{
        {"SET", "fleet", "truck1", "POINT", 33.0001, -112.0001}, {"OK"},
        {"GET", "fleet", "truck1", "POINT"}, {"[33.0001 -112.0001]"},
    }
}

Using a custom function:

func keys_MATCH_test(mc *mockServer) error {
	return mc.DoBatch([][]interface{}{
        {"SET", "fleet", "truck1", "POINT", 33.0001, -112.0001}, {
            func(v interface{}) (resp, expect interface{}) {
                // v is the value as strings or slices of strings
                // test will pass as long as `resp` and `expect` are the same.
                return v, "OK"
            },
		},
    }
}