Fix verification error and failing tests
Signed-off-by: johnniang <johnniang@fastmail.com>
This commit is contained in:
@@ -18,6 +18,7 @@ package devops
|
||||
|
||||
import (
|
||||
"github.com/emicklei/go-restful"
|
||||
|
||||
"kubesphere.io/kubesphere/pkg/kapis/generic"
|
||||
)
|
||||
|
||||
|
||||
@@ -17,11 +17,12 @@ limitations under the License.
|
||||
package devops
|
||||
|
||||
import (
|
||||
"github.com/emicklei/go-restful"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"net/http"
|
||||
"net/http/httptest"
|
||||
"testing"
|
||||
|
||||
"github.com/emicklei/go-restful"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestAddToContainer(t *testing.T) {
|
||||
@@ -41,6 +42,7 @@ func TestAddToContainer(t *testing.T) {
|
||||
args: args{
|
||||
target: "/kapis/devops.kubesphere.io/v1alpha1/resources",
|
||||
mockAPIPattern: "/v1alpha1/resources",
|
||||
mockResponse: fakeResponse,
|
||||
},
|
||||
wantResponse: fakeResponse,
|
||||
}, {
|
||||
@@ -48,6 +50,7 @@ func TestAddToContainer(t *testing.T) {
|
||||
args: args{
|
||||
target: "/kapis/devops.kubesphere.io/v1alpha2/resources",
|
||||
mockAPIPattern: "/v1alpha2/resources",
|
||||
mockResponse: fakeResponse,
|
||||
},
|
||||
wantResponse: fakeResponse,
|
||||
}, {
|
||||
@@ -55,6 +58,7 @@ func TestAddToContainer(t *testing.T) {
|
||||
args: args{
|
||||
target: "/kapis/devops.kubesphere.io/v1alpha3/resources",
|
||||
mockAPIPattern: "/v1alpha3/resources",
|
||||
mockResponse: fakeResponse,
|
||||
},
|
||||
wantResponse: fakeResponse,
|
||||
}, {
|
||||
|
||||
@@ -22,9 +22,10 @@ import (
|
||||
"flag"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
kapisdevops "kubesphere.io/kubesphere/pkg/kapis/devops"
|
||||
"log"
|
||||
|
||||
kapisdevops "kubesphere.io/kubesphere/pkg/kapis/devops"
|
||||
|
||||
"kubesphere.io/kubesphere/pkg/client/clientset/versioned/fake"
|
||||
"kubesphere.io/kubesphere/pkg/version"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user