blob: 7bc0870545852c1e84d174815c292bc0ada474b7 [file] [log] [blame]
Jatin Lodhia06b6d1f2015-06-12 11:06:15 -07001// Copyright 2015 The Vanadium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style
3// license that can be found in the LICENSE file.
4
5package server
6
7import (
8 "testing"
9)
10
Jatin Lodhia06b6d1f2015-06-12 11:06:15 -070011func TestStKey(t *testing.T) {
Adam Sadovskya31a7cd2015-07-08 10:44:07 -070012 tests := []struct {
13 appName string
14 dbName string
15 stKey string
16 }{
17 {"app1", "db1", "$dbInfo:app1:db1"},
18 }
19 for _, test := range tests {
20 got, want := dbInfoStKey(&app{name: test.appName}, test.dbName), test.stKey
21 if got != want {
22 t.Errorf("wrong stKey: got %q, want %q", got, want)
23 }
Jatin Lodhia06b6d1f2015-06-12 11:06:15 -070024 }
25}