diff --git a/.travis.yml b/.travis.yml index fee617b6e6..e7cb474bc4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,6 +6,5 @@ go: install: - echo "Don't run anything." -# Check non-vendored code for formatting. -script: diff -u <(echo -n) <(gofmt -l -s . | grep -v vendor) +# Run unit tests and linters. script: ./test.sh diff --git a/cli/cluster/cluster.go b/cli/cluster/cluster.go index 0c8fa411e0..411202edde 100644 --- a/cli/cluster/cluster.go +++ b/cli/cluster/cluster.go @@ -1,9 +1,12 @@ /* Copyright 2016 The Kubernetes Authors All rights reserved. + 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. diff --git a/cli/cluster/cluster_test.go b/cli/cluster/cluster_test.go index 96b25cccfb..808601ca34 100644 --- a/cli/cluster/cluster_test.go +++ b/cli/cluster/cluster_test.go @@ -1,3 +1,19 @@ +/* +Copyright 2016 The Kubernetes Authors All rights reserved. + +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 cluster import ( diff --git a/cli/cmd/delete.go b/cli/cmd/delete.go index 49636a5999..d8c1dc95a7 100644 --- a/cli/cmd/delete.go +++ b/cli/cmd/delete.go @@ -1,9 +1,12 @@ /* Copyright 2016 The Kubernetes Authors All rights reserved. + 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. diff --git a/cli/cmd/root.go b/cli/cmd/root.go index 9d8d817505..89f7f10177 100644 --- a/cli/cmd/root.go +++ b/cli/cmd/root.go @@ -1,9 +1,12 @@ /* Copyright 2016 The Kubernetes Authors All rights reserved. + 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. diff --git a/cli/cmd/root_test.go b/cli/cmd/root_test.go index c9c6eeea1c..b0b2df9768 100644 --- a/cli/cmd/root_test.go +++ b/cli/cmd/root_test.go @@ -1,3 +1,19 @@ +/* +Copyright 2016 The Kubernetes Authors All rights reserved. + +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 cmd import ( diff --git a/cli/cmd/start.go b/cli/cmd/start.go index ed48176db2..033aefc0ce 100644 --- a/cli/cmd/start.go +++ b/cli/cmd/start.go @@ -1,9 +1,12 @@ /* Copyright 2016 The Kubernetes Authors All rights reserved. + 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. diff --git a/cli/cmd/status.go b/cli/cmd/status.go index a46b31d8b8..41749ae4c5 100644 --- a/cli/cmd/status.go +++ b/cli/cmd/status.go @@ -1,9 +1,12 @@ /* Copyright 2016 The Kubernetes Authors All rights reserved. + 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. diff --git a/cli/cmd/stop.go b/cli/cmd/stop.go index a163f080ca..46bbdc4d1b 100644 --- a/cli/cmd/stop.go +++ b/cli/cmd/stop.go @@ -1,9 +1,12 @@ /* Copyright 2016 The Kubernetes Authors All rights reserved. + 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. diff --git a/cli/constants/constants.go b/cli/constants/constants.go index a959aa5bab..05bf07a8ef 100644 --- a/cli/constants/constants.go +++ b/cli/constants/constants.go @@ -1,3 +1,19 @@ +/* +Copyright 2016 The Kubernetes Authors All rights reserved. + +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 constants import ( diff --git a/cli/machine/client.go b/cli/machine/client.go index 3fd38c9366..bf061f17b8 100644 --- a/cli/machine/client.go +++ b/cli/machine/client.go @@ -1,9 +1,12 @@ /* Copyright 2016 The Kubernetes Authors All rights reserved. + 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. diff --git a/cli/machine/client_test.go b/cli/machine/client_test.go index f5ee523d35..8c52fcd8c8 100644 --- a/cli/machine/client_test.go +++ b/cli/machine/client_test.go @@ -1,3 +1,19 @@ +/* +Copyright 2016 The Kubernetes Authors All rights reserved. + +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 machine import ( diff --git a/cli/main.go b/cli/main.go index d284537399..145c5c99e0 100644 --- a/cli/main.go +++ b/cli/main.go @@ -1,9 +1,12 @@ /* Copyright 2016 The Kubernetes Authors All rights reserved. + 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. diff --git a/cli/tests/api_mock.go b/cli/tests/api_mock.go index 4fa18ec50d..2c7d1cac7b 100644 --- a/cli/tests/api_mock.go +++ b/cli/tests/api_mock.go @@ -1,3 +1,19 @@ +/* +Copyright 2016 The Kubernetes Authors All rights reserved. + +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 tests import ( diff --git a/cli/tests/driver_mock.go b/cli/tests/driver_mock.go index 5e7b10d615..c4e48a16ea 100644 --- a/cli/tests/driver_mock.go +++ b/cli/tests/driver_mock.go @@ -1,3 +1,19 @@ +/* +Copyright 2016 The Kubernetes Authors All rights reserved. + +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 tests import ( diff --git a/integration/start_stop_delete_test.go b/integration/start_stop_delete_test.go index cff9894bb1..6dbc01395d 100644 --- a/integration/start_stop_delete_test.go +++ b/integration/start_stop_delete_test.go @@ -2,10 +2,13 @@ /* Copyright 2016 The Kubernetes Authors All rights reserved. + 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. diff --git a/test.sh b/test.sh index 3b667b6cae..a5a7db9099 100755 --- a/test.sh +++ b/test.sh @@ -22,3 +22,5 @@ for TEST in $(find -name "*.go" | grep -v vendor | grep -v integration | grep _t go test -v ${REPO_PATH}/${TEST} done +# Check gofmt +diff -u <(echo -n) <(gofmt -l -s . | grep -v vendor)