mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-28 05:57:25 +00:00
migrate cluster dns test to sig network
This commit is contained in:
parent
fdbec79345
commit
4ab97a7cb8
@ -39,7 +39,6 @@ go_library(
|
|||||||
srcs = [
|
srcs = [
|
||||||
"e2e.go",
|
"e2e.go",
|
||||||
"events.go",
|
"events.go",
|
||||||
"example_cluster_dns.go",
|
|
||||||
"examples.go",
|
"examples.go",
|
||||||
"gke_local_ssd.go",
|
"gke_local_ssd.go",
|
||||||
"gke_node_pools.go",
|
"gke_node_pools.go",
|
||||||
|
@ -598,17 +598,6 @@ func makeHttpRequestToService(c clientset.Interface, ns, service, path string, t
|
|||||||
return string(result), err
|
return string(result), err
|
||||||
}
|
}
|
||||||
|
|
||||||
// pass enough context with the 'old' parameter so that it replaces what your really intended.
|
|
||||||
func prepareResourceWithReplacedString(inputFile, old, new string) string {
|
|
||||||
f, err := os.Open(inputFile)
|
|
||||||
Expect(err).NotTo(HaveOccurred())
|
|
||||||
defer f.Close()
|
|
||||||
data, err := ioutil.ReadAll(f)
|
|
||||||
Expect(err).NotTo(HaveOccurred())
|
|
||||||
podYaml := strings.Replace(string(data), old, new, 1)
|
|
||||||
return podYaml
|
|
||||||
}
|
|
||||||
|
|
||||||
func createFileForGoBinData(gobindataPath, outputFilename string) error {
|
func createFileForGoBinData(gobindataPath, outputFilename string) error {
|
||||||
data := generated.ReadOrDie(gobindataPath)
|
data := generated.ReadOrDie(gobindataPath)
|
||||||
if len(data) == 0 {
|
if len(data) == 0 {
|
||||||
|
@ -12,6 +12,7 @@ go_library(
|
|||||||
"dns_common.go",
|
"dns_common.go",
|
||||||
"dns_configmap.go",
|
"dns_configmap.go",
|
||||||
"doc.go",
|
"doc.go",
|
||||||
|
"example_cluster_dns.go",
|
||||||
"firewall.go",
|
"firewall.go",
|
||||||
"framework.go",
|
"framework.go",
|
||||||
"ingress.go",
|
"ingress.go",
|
||||||
|
@ -14,11 +14,14 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package e2e
|
package network
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"io/ioutil"
|
||||||
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"k8s.io/api/core/v1"
|
"k8s.io/api/core/v1"
|
||||||
@ -44,7 +47,7 @@ try:
|
|||||||
except:
|
except:
|
||||||
print 'err'`
|
print 'err'`
|
||||||
|
|
||||||
var _ = framework.KubeDescribe("ClusterDns [Feature:Example]", func() {
|
var _ = SIGDescribe("ClusterDns [Feature:Example]", func() {
|
||||||
f := framework.NewDefaultFramework("cluster-dns")
|
f := framework.NewDefaultFramework("cluster-dns")
|
||||||
|
|
||||||
var c clientset.Interface
|
var c clientset.Interface
|
||||||
@ -156,3 +159,14 @@ var _ = framework.KubeDescribe("ClusterDns [Feature:Example]", func() {
|
|||||||
func getNsCmdFlag(ns *v1.Namespace) string {
|
func getNsCmdFlag(ns *v1.Namespace) string {
|
||||||
return fmt.Sprintf("--namespace=%v", ns.Name)
|
return fmt.Sprintf("--namespace=%v", ns.Name)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// pass enough context with the 'old' parameter so that it replaces what your really intended.
|
||||||
|
func prepareResourceWithReplacedString(inputFile, old, new string) string {
|
||||||
|
f, err := os.Open(inputFile)
|
||||||
|
Expect(err).NotTo(HaveOccurred())
|
||||||
|
defer f.Close()
|
||||||
|
data, err := ioutil.ReadAll(f)
|
||||||
|
Expect(err).NotTo(HaveOccurred())
|
||||||
|
podYaml := strings.Replace(string(data), old, new, 1)
|
||||||
|
return podYaml
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user