Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(299)

Unified Diff: common/config/projectName_test.go

Issue 2626433004: Move "common/config" common types into cfgtypes. (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « common/config/projectName.go ('k') | common/config/util.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: common/config/projectName_test.go
diff --git a/common/config/projectName_test.go b/common/config/projectName_test.go
deleted file mode 100644
index 91c3fc3ad62fc7b71ef90bea0175b6ec9fd94fd6..0000000000000000000000000000000000000000
--- a/common/config/projectName_test.go
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2016 The LUCI Authors. All rights reserved.
-// Use of this source code is governed under the Apache License, Version 2.0
-// that can be found in the LICENSE file.
-
-package config
-
-import (
- "fmt"
- "testing"
-
- . "github.com/luci/luci-go/common/testing/assertions"
- . "github.com/smartystreets/goconvey/convey"
-)
-
-func TestProjectName(t *testing.T) {
- t.Parallel()
-
- Convey(`Testing valid project names`, t, func() {
- for _, testCase := range []ProjectName{
- "a",
- "foo_bar-baz-059",
- } {
- Convey(fmt.Sprintf(`Project name %q is valid`, testCase), func() {
- So(testCase.Validate(), ShouldBeNil)
- })
- }
- })
-
- Convey(`Testing invalid project names`, t, func() {
- for _, testCase := range []struct {
- v ProjectName
- errorsLike string
- }{
- {"", "cannot have empty name"},
- {"foo/bar", "invalid character"},
- {"_name", "must begin with a letter"},
- {"1eet", "must begin with a letter"},
- } {
- Convey(fmt.Sprintf(`Project name %q fails with error %q`, testCase.v, testCase.errorsLike), func() {
- So(testCase.v.Validate(), ShouldErrLike, testCase.errorsLike)
- })
- }
- })
-}
« no previous file with comments | « common/config/projectName.go ('k') | common/config/util.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698