router_utils_test.go | |
---|---|
Copyright 2020, 2021, 2022 Red Hat, Inc 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
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. |
|
TestReadClusterListFromPathMissingClusterList function checks if missing cluster list in path is detected and processed correctly by function ReadClusterListFromPath. |
|
try to read list of clusters from path |
|
missing list means that the read operation should fail |
|
TestReadClusterListFromPathEmptyClusterList function checks if empty cluster list in path is detected and processed correctly by function ReadClusterListFromPath. |
|
try to read list of clusters from path |
|
empty list means that the read operation should fail |
|
TestReadClusterListFromPathOneCluster function checks if list with one cluster ID is processed correctly by function ReadClusterListFromPath. |
|
try to read list of clusters from path |
|
cluster list exists so the read operation should not fail |
|
we expect do get list with one cluster ID |
|
TestReadClusterListFromPathTwoClusters function checks if list with two cluster IDs is processed correctly by function ReadClusterListFromPath. |
|
try to read list of clusters from path |
|
cluster list exists so the read operation should not fail |
|
we expect do get list with two cluster IDs |
|
TestReadClusterListFromBodyNoJSON function checks if reading list of clusters from empty request body is detected properly by function ReadClusterListFromBody. |
|
try to read list of clusters from path |
|
the read should fail because of empty request body |
|
TestReadClusterListFromBodyCorrectJSON function checks if reading list of clusters from correct request body containing JSON data is done correctly by function ReadClusterListFromBody. |
|
try to read list of clusters from path |
|
cluster list exists so the call should not fail |
|
we expect do get list with two cluster IDs |
|
TestReadClusterListFromBodyWrongJSON function checks if reading list of clusters from request body with improper format is processed correctly by function ReadClusterListFromBody. |
|
try to read list of clusters from path |
|
the read should fail because of broken JSON |
|