Revert "Use watch param instead of deprecated /watch/ prefix"

This commit is contained in:
Wojciech Tyczynski
2017-02-21 08:37:51 +01:00
committed by GitHub
parent 6a65964d0e
commit a21b08d00f
116 changed files with 149 additions and 176 deletions

View File

@@ -122,8 +122,8 @@ func TestListWatchesCanWatch(t *testing.T) {
// Node
{
location: buildLocation(
testapi.Default.ResourcePath("nodes", metav1.NamespaceAll, ""),
buildQueryValues(url.Values{"watch": []string{"true"}})),
testapi.Default.ResourcePathWithPrefix("watch", "nodes", metav1.NamespaceAll, ""),
buildQueryValues(url.Values{})),
rv: "",
resource: "nodes",
namespace: metav1.NamespaceAll,
@@ -131,8 +131,8 @@ func TestListWatchesCanWatch(t *testing.T) {
},
{
location: buildLocation(
testapi.Default.ResourcePath("nodes", metav1.NamespaceAll, ""),
buildQueryValues(url.Values{"resourceVersion": []string{"42"}, "watch": []string{"true"}})),
testapi.Default.ResourcePathWithPrefix("watch", "nodes", metav1.NamespaceAll, ""),
buildQueryValues(url.Values{"resourceVersion": []string{"42"}})),
rv: "42",
resource: "nodes",
namespace: metav1.NamespaceAll,
@@ -141,8 +141,8 @@ func TestListWatchesCanWatch(t *testing.T) {
// pod with "assigned" field selector.
{
location: buildLocation(
testapi.Default.ResourcePath("pods", metav1.NamespaceAll, ""),
buildQueryValues(url.Values{fieldSelectorQueryParamName: []string{"spec.host="}, "resourceVersion": []string{"0"}, "watch": []string{"true"}})),
testapi.Default.ResourcePathWithPrefix("watch", "pods", metav1.NamespaceAll, ""),
buildQueryValues(url.Values{fieldSelectorQueryParamName: []string{"spec.host="}, "resourceVersion": []string{"0"}})),
rv: "0",
resource: "pods",
namespace: metav1.NamespaceAll,
@@ -151,8 +151,8 @@ func TestListWatchesCanWatch(t *testing.T) {
// pod with namespace foo and assigned field selector
{
location: buildLocation(
testapi.Default.ResourcePath("pods", "foo", ""),
buildQueryValues(url.Values{fieldSelectorQueryParamName: []string{"spec.host="}, "resourceVersion": []string{"0"}, "watch": []string{"true"}})),
testapi.Default.ResourcePathWithPrefix("watch", "pods", "foo", ""),
buildQueryValues(url.Values{fieldSelectorQueryParamName: []string{"spec.host="}, "resourceVersion": []string{"0"}})),
rv: "0",
resource: "pods",
namespace: "foo",