Skip to content

Commit

Permalink
diff: Make filename cross-platform compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
Antoine Pelisse committed Dec 11, 2018
1 parent b6135f6 commit 95eec90
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pkg/kubectl/cmd/diff/diff.go
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ func (obj InfoObject) Name() string {
group = fmt.Sprintf("%v.", obj.Info.Mapping.GroupVersionKind.Group)
}
return group + fmt.Sprintf(
"%v.%v:%v.%v",
"%v.%v.%v.%v",
obj.Info.Mapping.GroupVersionKind.Version,
obj.Info.Mapping.GroupVersionKind.Kind,
obj.Info.Namespace,
Expand Down
8 changes: 4 additions & 4 deletions test/cmd/diff.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ run_kubectl_diff_same_names() {
kube::log::status "Test kubectl diff with multiple resources with the same name"

output_message=$(KUBECTL_EXTERNAL_DIFF=find kubectl diff -Rf hack/testdata/diff/)
kube::test::if_has_string "${output_message}" 'v1.Pod:.*.test'
kube::test::if_has_string "${output_message}" 'apps.v1.Deployment:.*.test'
kube::test::if_has_string "${output_message}" 'v1.ConfigMap:.*.test'
kube::test::if_has_string "${output_message}" 'v1.Secret:.*.test'
kube::test::if_has_string "${output_message}" 'v1\.Pod\..*\.test'
kube::test::if_has_string "${output_message}" 'apps\.v1\.Deployment\..*\.test'
kube::test::if_has_string "${output_message}" 'v1\.ConfigMap\..*\.test'
kube::test::if_has_string "${output_message}" 'v1\.Secret\..*\.test'

set +o nounset
set +o errexit
Expand Down

0 comments on commit 95eec90

Please sign in to comment.