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 <gkganesh126@gmail.com>
This commit is contained in:
gkGaneshR
2018-03-04 21:05:16 +05:30
parent 3868f48586
commit a591ce52f9

View File

@@ -1,3 +1,19 @@
/*
Copyright 2018 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package options
import (
@@ -13,7 +29,7 @@ type Options struct {
HostnameOverride string
}
//TestSetNodeNameOrDie tests for permutations of nodename, hostname and hostnameoverride
// TestSetNodeNameOrDie tests for permutations of nodename, hostname and hostnameoverride
func TestSetNodeNameOrDie(t *testing.T) {
options := map[string]struct {
Expected Options
@@ -88,11 +104,11 @@ func TestSetNodeNameOrDie(t *testing.T) {
}
if opt.Expected.Hostname != "" {
//Changing hostname
// Changing hostname
cmd := exec.Command("hostname", opt.Expected.Hostname)
_, err := cmd.CombinedOutput()
if err != nil {
//If changing hostname requires admin privilege
// If changing hostname requires admin privilege
cmd = exec.Command("sudo", "hostname", opt.Expected.Hostname)
_, err := cmd.CombinedOutput()
if err != nil {
@@ -120,7 +136,7 @@ func TestSetNodeNameOrDie(t *testing.T) {
}
}
// Setting back the original attributes
err = os.Setenv("NODE_NAME", orig_node_name)
if err != nil {
fmt.Println("Unable to set original : env NODE_NAME")