| Index: impl/memory/info_test.go
|
| diff --git a/impl/memory/info_test.go b/impl/memory/info_test.go
|
| index 200f43764962e5d6d044fb5658c346ba61d3bdd5..07fcd09486f49fc46b9fdfa4427417ce73cdcdc1 100644
|
| --- a/impl/memory/info_test.go
|
| +++ b/impl/memory/info_test.go
|
| @@ -5,6 +5,7 @@
|
| package memory
|
|
|
| import (
|
| + "fmt"
|
| "testing"
|
|
|
| "github.com/luci/gae/service/info"
|
| @@ -18,12 +19,22 @@ func TestMustNamespace(t *testing.T) {
|
| c := Use(context.Background())
|
| i := info.Get(c)
|
|
|
| - So(func() {
|
| - i.MustNamespace("valid_namespace_name")
|
| - }, ShouldNotPanic)
|
| - So(func() {
|
| - i.MustNamespace("invalid namespace name")
|
| - }, ShouldPanic)
|
| + for _, ns := range []string{
|
| + "valid_namespace_name",
|
| + } {
|
| + Convey(fmt.Sprintf("%q is a valid namespace.", ns), func() {
|
| + So(func() { i.MustNamespace(ns) }, ShouldNotPanic)
|
| + })
|
| + }
|
| +
|
| + for _, ns := range []string{
|
| + "",
|
| + "invalid namespace name",
|
| + } {
|
| + Convey(fmt.Sprintf("%q is an invalid namespace.", ns), func() {
|
| + So(func() { i.MustNamespace(ns) }, ShouldPanic)
|
| + })
|
| + }
|
| })
|
|
|
| Convey("Testable interface works", t, func() {
|
|
|