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

Unified Diff: deploytool/cmd/version_test.go

Issue 2182213002: deploytool: Add README.md, migrate docs to it. (Closed) Base URL: https://github.com/luci/luci-go@master
Patch Set: Rename to "luci_deploy" Created 4 years, 5 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 | « deploytool/cmd/version.go ('k') | deploytool/cmd/work.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: deploytool/cmd/version_test.go
diff --git a/deploytool/cmd/version_test.go b/deploytool/cmd/version_test.go
deleted file mode 100644
index 623430c5bc34823929b867b6ea04886d6aa959c5..0000000000000000000000000000000000000000
--- a/deploytool/cmd/version_test.go
+++ /dev/null
@@ -1,63 +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 main
-
-import (
- "testing"
-
- "github.com/luci/luci-go/deploytool/api/deploy"
-
- . "github.com/smartystreets/goconvey/convey"
-)
-
-func TestCloudProjectVersion(t *testing.T) {
- Convey(`A cloud project version`, t, func() {
- b := cloudProjectVersionBuilder{
- currentUser: func() (string, error) {
- return "test-person", nil
- },
- }
- cp := layoutDeploymentCloudProject{
- Deployment_CloudProject: &deploy.Deployment_CloudProject{
- VersionScheme: deploy.Deployment_CloudProject_DEFAULT,
- },
- }
- src := layoutSource{
- FrozenLayout_Source: &deploy.FrozenLayout_Source{
- MinorVersion: "--minor",
- MajorVersion: "major",
- },
- sg: &layoutSourceGroup{
- FrozenLayout_SourceGroup: &deploy.FrozenLayout_SourceGroup{},
- },
- }
-
- Convey(`Renders and parses without a tainted user.`, func() {
- v, err := b.build(&cp, &src)
- So(err, ShouldBeNil)
-
- s := v.String()
- So(s, ShouldEqual, "__minor-major")
-
- parsed, err := parseCloudProjectVersion(deploy.Deployment_CloudProject_DEFAULT, s)
- So(err, ShouldBeNil)
- So(parsed, ShouldResemble, v)
- })
-
- Convey(`Renders and parses with a tainted user.`, func() {
- src.sg.Tainted = true
-
- v, err := b.build(&cp, &src)
- So(err, ShouldBeNil)
-
- s := v.String()
- So(s, ShouldEqual, "__minor-major-tainted-test_person")
-
- parsed, err := parseCloudProjectVersion(deploy.Deployment_CloudProject_DEFAULT, s)
- So(err, ShouldBeNil)
- So(parsed, ShouldResemble, v)
- })
- })
-}
« no previous file with comments | « deploytool/cmd/version.go ('k') | deploytool/cmd/work.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698