mirror of https://github.com/k3s-io/k3s
b265f7c682
Automatic merge from submit-queue (batch tested with PRs 65582, 65480, 65310, 65644, 65645). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Fix test failure of truncated time **What this PR does / why we need it**: The test of `TestFsStoreAssignedModified` in `pkg/kubelet/kubeletconfig/checkpoint/store` fails in my environment like below. ``` $ make test WHAT=./pkg/kubelet/kubeletconfig/checkpoint/store/ Running tests for APIVersion: v1,admissionregistration.k8s.io/v1alpha1,admissionregistration.k8s.io/v1beta1,admission.k8s.io/v1beta1,apps/v1beta1,apps/v1beta2,apps/v1,authentication.k8s.io/v1,authentication.k8s.io/v1beta1,authorization.k8s.io/v1,authorization.k8s.io/v1beta1,autoscaling/v1,autoscaling/v2beta1,batch/v1,batch/v1beta1,batch/v2alpha1,certificates.k8s.io/v1beta1,coordination.k8s.io/v1beta1,extensions/v1beta1,events.k8s.io/v1beta1,imagepolicy.k8s.io/v1alpha1,networking.k8s.io/v1,policy/v1beta1,rbac.authorization.k8s.io/v1,rbac.authorization.k8s.io/v1beta1,rbac.authorization.k8s.io/v1alpha1,scheduling.k8s.io/v1alpha1,scheduling.k8s.io/v1beta1,settings.k8s.io/v1alpha1,storage.k8s.io/v1beta1,storage.k8s.io/v1,storage.k8s.io/v1alpha1, +++ [0628 22:53:39] Running tests without code coverage --- FAIL: TestFsStoreAssignedModified (0.00s) fsstore_test.go:316: expect "2018-06-28T22:53:43+09:00" but got "2018-06-28T22:53:43+09:00" FAIL FAIL k8s.io/kubernetes/pkg/kubelet/kubeletconfig/checkpoint/store 0.236s make: *** [test] Error 1 ``` My environment is OS: macOS Sierra Version 10.12.6 File System: Journaled HFS+ The error message confused me because the comparing times looked the same in the error log. If we know certain systems truncate times, I think we can just compare less precise times to avoid confusions in tests. **Special notes for your reviewer**: N/A **Release note**: ```release-note NONE ``` |
||
---|---|---|
.. | ||
apis | ||
cadvisor | ||
certificate | ||
checkpoint | ||
checkpointmanager | ||
client | ||
cm | ||
config | ||
configmap | ||
container | ||
custommetrics | ||
dockershim | ||
envvars | ||
events | ||
eviction | ||
images | ||
kubeletconfig | ||
kuberuntime | ||
leaky | ||
lifecycle | ||
logs | ||
metrics | ||
mountpod | ||
network | ||
pleg | ||
pod | ||
preemption | ||
prober | ||
qos | ||
remote | ||
secret | ||
server | ||
stats | ||
status | ||
sysctl | ||
token | ||
types | ||
util | ||
volumemanager | ||
winstats | ||
BUILD | ||
OWNERS | ||
active_deadline.go | ||
active_deadline_test.go | ||
doc.go | ||
kubelet.go | ||
kubelet_getters.go | ||
kubelet_getters_test.go | ||
kubelet_network.go | ||
kubelet_network_test.go | ||
kubelet_node_status.go | ||
kubelet_node_status_test.go | ||
kubelet_pods.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_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 |