summaryrefslogtreecommitdiff
path: root/pkg/test/test.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/test/test.go')
-rw-r--r--pkg/test/test.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/pkg/test/test.go b/pkg/test/test.go
index 89722fd..44289c9 100644
--- a/pkg/test/test.go
+++ b/pkg/test/test.go
@@ -14,6 +14,8 @@ import (
"tunnel/pkg/server"
)
+const xData = "Hello, World!"
+
type env struct {
*testing.T
}
@@ -69,6 +71,14 @@ func (c *Client) Send(format string, args ...interface{}) string {
return r
}
+func (c *Client) Get(name string) string {
+ return c.Send("get %s", name)
+}
+
+func (c *Client) Set(name string, value interface{}) {
+ c.Exec("set %s %s", name, value)
+}
+
func (c *Client) Exec(format string, args ...interface{}) {
s := c.Send(format, args...)
if s != "" {