mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +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 = [
|
||||
"e2e.go",
|
||||
"events.go",
|
||||
"example_cluster_dns.go",
|
||||
"examples.go",
|
||||
"gke_local_ssd.go",
|
||||
"gke_node_pools.go",
|
||||
|
@ -598,17 +598,6 @@ func makeHttpRequestToService(c clientset.Interface, ns, service, path string, t
|
||||
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 {
|
||||
data := generated.ReadOrDie(gobindataPath)
|
||||
if len(data) == 0 {
|
||||
|
@ -12,6 +12,7 @@ go_library(
|
||||
"dns_common.go",
|
||||
"dns_configmap.go",
|
||||
"doc.go",
|
||||
"example_cluster_dns.go",
|
||||
"firewall.go",
|
||||
"framework.go",
|
||||
"ingress.go",
|
||||
|
@ -14,11 +14,14 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package e2e
|
||||
package network
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"k8s.io/api/core/v1"
|
||||
@ -44,7 +47,7 @@ try:
|
||||
except:
|
||||
print 'err'`
|
||||
|
||||
var _ = framework.KubeDescribe("ClusterDns [Feature:Example]", func() {
|
||||
var _ = SIGDescribe("ClusterDns [Feature:Example]", func() {
|
||||
f := framework.NewDefaultFramework("cluster-dns")
|
||||
|
||||
var c clientset.Interface
|
||||
@ -156,3 +159,14 @@ var _ = framework.KubeDescribe("ClusterDns [Feature:Example]", func() {
|
||||
func getNsCmdFlag(ns *v1.Namespace) string {
|
||||
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