1 Star 0 Fork 0

zhuchance/kubernetes

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
.github
Godeps
api
build
cluster
cmd
docs
hack
logo
pkg
api
apis
auth
capabilities
client
cloudprovider
controller
credentialprovider
features
fieldpath
generated
kubeapiserver
kubectl
kubelet
apis
cadvisor
certificate
checkpoint
checkpointmanager
client
cloudresource
cm
config
configmap
container
custommetrics
dockershim
envvars
events
eviction
images
kubeletconfig
kuberuntime
leaky
lifecycle
logs
metrics
mountpod
network
nodelease
nodestatus
pleg
pod
preemption
prober
qos
remote
runtimeclass
secret
server
stats
status
sysctl
token
types
util
volumemanager
winstats
BUILD
OWNERS
active_deadline.go
active_deadline_test.go
doc.go
errors.go
kubelet.go
kubelet_getters.go
kubelet_getters_test.go
kubelet_network.go
kubelet_network_linux.go
kubelet_network_others.go
kubelet_network_test.go
kubelet_node_status.go
kubelet_node_status_test.go
kubelet_pods.go
kubelet_pods_linux_test.go
kubelet_pods_test.go
kubelet_pods_windows_test.go
kubelet_resources.go
kubelet_resources_test.go
kubelet_test.go
kubelet_volumes.go
kubelet_volumes_linux_test.go
kubelet_volumes_test.go
oom_watcher.go
oom_watcher_test.go
pod_container_deletor.go
pod_container_deletor_test.go
pod_workers.go
pod_workers_test.go
reason_cache.go
reason_cache_test.go
runonce.go
runonce_test.go
runtime.go
util.go
volume_host.go
kubemark
master
printers
probe
proxy
quota
registry
routes
scheduler
security
securitycontext
serviceaccount
ssh
util
version
volume
watch/json
windows/service
.import-restrictions
BUILD
OWNERS
plugin
staging
test
third_party
translations
vendor
.bazelrc
.generated_files
.gitattributes
.gitignore
.kazelcfg.json
BUILD.bazel
CHANGELOG-1.14.md
CHANGELOG.md
CONTRIBUTING.md
LICENSE
Makefile
Makefile.generated_files
OWNERS
OWNERS_ALIASES
README.md
SECURITY_CONTACTS
SUPPORT.md
WORKSPACE
code-of-conduct.md
克隆/下载
oom_watcher_test.go 1.13 KB
一键复制 编辑 原始数据 按行查看 历史
/*
Copyright 2015 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 kubelet
import (
"testing"
"github.com/stretchr/testify/assert"
"k8s.io/api/core/v1"
"k8s.io/client-go/tools/record"
cadvisortest "k8s.io/kubernetes/pkg/kubelet/cadvisor/testing"
)
func TestBasic(t *testing.T) {
fakeRecorder := &record.FakeRecorder{}
mockCadvisor := &cadvisortest.Fake{}
node := &v1.ObjectReference{}
oomWatcher := NewOOMWatcher(mockCadvisor, fakeRecorder)
assert.NoError(t, oomWatcher.Start(node))
// TODO: Improve this test once cadvisor exports events.EventChannel as an interface
// and thereby allow using a mock version of cadvisor.
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/meoom/kubernetes.git
git@gitee.com:meoom/kubernetes.git
meoom
kubernetes
kubernetes
v1.14.0

搜索帮助