From 134e43c2790bed858b54fc1933ab97313a0385f5 Mon Sep 17 00:00:00 2001 From: Karthik K N Date: Wed, 3 Apr 2024 12:30:59 +0530 Subject: [PATCH] Add doc.go file without any buildconstraint to run tests on non linux systems --- pkg/proxy/iptables/doc.go | 19 +++++++++++++++++++ pkg/proxy/ipvs/ipset/doc.go | 19 +++++++++++++++++++ pkg/proxy/ipvs/ipset/testing/doc.go | 19 +++++++++++++++++++ pkg/proxy/ipvs/testing/doc.go | 19 +++++++++++++++++++ pkg/proxy/ipvs/util/doc.go | 19 +++++++++++++++++++ pkg/proxy/ipvs/util/testing/doc.go | 19 +++++++++++++++++++ pkg/proxy/nftables/doc.go | 19 +++++++++++++++++++ pkg/util/iptables/testing/doc.go | 19 +++++++++++++++++++ 8 files changed, 152 insertions(+) create mode 100644 pkg/proxy/iptables/doc.go create mode 100644 pkg/proxy/ipvs/ipset/doc.go create mode 100644 pkg/proxy/ipvs/ipset/testing/doc.go create mode 100644 pkg/proxy/ipvs/testing/doc.go create mode 100644 pkg/proxy/ipvs/util/doc.go create mode 100644 pkg/proxy/ipvs/util/testing/doc.go create mode 100644 pkg/proxy/nftables/doc.go create mode 100644 pkg/util/iptables/testing/doc.go diff --git a/pkg/proxy/iptables/doc.go b/pkg/proxy/iptables/doc.go new file mode 100644 index 00000000000..57c38e03c51 --- /dev/null +++ b/pkg/proxy/iptables/doc.go @@ -0,0 +1,19 @@ +/* +Copyright 2024 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. +*/ + +// This is an empty file to avoid "build constraints exclude all Go files" error while running unit tests on non-linux platforms. + +package iptables diff --git a/pkg/proxy/ipvs/ipset/doc.go b/pkg/proxy/ipvs/ipset/doc.go new file mode 100644 index 00000000000..21e19112119 --- /dev/null +++ b/pkg/proxy/ipvs/ipset/doc.go @@ -0,0 +1,19 @@ +/* +Copyright 2024 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. +*/ + +// This is an empty file to avoid "build constraints exclude all Go files" error while running unit tests on non-linux platforms. + +package ipset diff --git a/pkg/proxy/ipvs/ipset/testing/doc.go b/pkg/proxy/ipvs/ipset/testing/doc.go new file mode 100644 index 00000000000..a33822aa9cb --- /dev/null +++ b/pkg/proxy/ipvs/ipset/testing/doc.go @@ -0,0 +1,19 @@ +/* +Copyright 2024 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. +*/ + +// This is an empty file to avoid "build constraints exclude all Go files" error while running unit tests on non-linux platforms. + +package testing diff --git a/pkg/proxy/ipvs/testing/doc.go b/pkg/proxy/ipvs/testing/doc.go new file mode 100644 index 00000000000..a33822aa9cb --- /dev/null +++ b/pkg/proxy/ipvs/testing/doc.go @@ -0,0 +1,19 @@ +/* +Copyright 2024 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. +*/ + +// This is an empty file to avoid "build constraints exclude all Go files" error while running unit tests on non-linux platforms. + +package testing diff --git a/pkg/proxy/ipvs/util/doc.go b/pkg/proxy/ipvs/util/doc.go new file mode 100644 index 00000000000..6d179851507 --- /dev/null +++ b/pkg/proxy/ipvs/util/doc.go @@ -0,0 +1,19 @@ +/* +Copyright 2024 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. +*/ + +// This is an empty file to avoid "build constraints exclude all Go files" error while running unit tests on non-linux platforms. + +package ipvs diff --git a/pkg/proxy/ipvs/util/testing/doc.go b/pkg/proxy/ipvs/util/testing/doc.go new file mode 100644 index 00000000000..a33822aa9cb --- /dev/null +++ b/pkg/proxy/ipvs/util/testing/doc.go @@ -0,0 +1,19 @@ +/* +Copyright 2024 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. +*/ + +// This is an empty file to avoid "build constraints exclude all Go files" error while running unit tests on non-linux platforms. + +package testing diff --git a/pkg/proxy/nftables/doc.go b/pkg/proxy/nftables/doc.go new file mode 100644 index 00000000000..02fa63627dd --- /dev/null +++ b/pkg/proxy/nftables/doc.go @@ -0,0 +1,19 @@ +/* +Copyright 2024 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. +*/ + +// This is an empty file to avoid "build constraints exclude all Go files" error while running unit tests on non-linux platforms. + +package nftables diff --git a/pkg/util/iptables/testing/doc.go b/pkg/util/iptables/testing/doc.go new file mode 100644 index 00000000000..a33822aa9cb --- /dev/null +++ b/pkg/util/iptables/testing/doc.go @@ -0,0 +1,19 @@ +/* +Copyright 2024 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. +*/ + +// This is an empty file to avoid "build constraints exclude all Go files" error while running unit tests on non-linux platforms. + +package testing