Skip to content

Commit a591ce5

Browse files
committed
Added copyright 2018 statement
1. Why is this change necessary ? Added copyright 2018 statement on options_test.go and added space between // and text on the comments. Signed-off-by: gkGaneshR <[email protected]>
1 parent 3868f48 commit a591ce5

File tree

1 file changed

+20
-4
lines changed

1 file changed

+20
-4
lines changed

cmd/options/options_test.go

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/*
2+
Copyright 2018 The Kubernetes Authors.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
117
package options
218

319
import (
@@ -13,7 +29,7 @@ type Options struct {
1329
HostnameOverride string
1430
}
1531

16-
//TestSetNodeNameOrDie tests for permutations of nodename, hostname and hostnameoverride
32+
// TestSetNodeNameOrDie tests for permutations of nodename, hostname and hostnameoverride
1733
func TestSetNodeNameOrDie(t *testing.T) {
1834
options := map[string]struct {
1935
Expected Options
@@ -88,11 +104,11 @@ func TestSetNodeNameOrDie(t *testing.T) {
88104
}
89105

90106
if opt.Expected.Hostname != "" {
91-
//Changing hostname
107+
// Changing hostname
92108
cmd := exec.Command("hostname", opt.Expected.Hostname)
93109
_, err := cmd.CombinedOutput()
94110
if err != nil {
95-
//If changing hostname requires admin privilege
111+
// If changing hostname requires admin privilege
96112
cmd = exec.Command("sudo", "hostname", opt.Expected.Hostname)
97113
_, err := cmd.CombinedOutput()
98114
if err != nil {
@@ -120,7 +136,7 @@ func TestSetNodeNameOrDie(t *testing.T) {
120136
}
121137

122138
}
123-
139+
// Setting back the original attributes
124140
err = os.Setenv("NODE_NAME", orig_node_name)
125141
if err != nil {
126142
fmt.Println("Unable to set original : env NODE_NAME")

0 commit comments

Comments
 (0)