Skip to content

Commit

Permalink
Upgraded the dependent go modules (#232)
Browse files Browse the repository at this point in the history
Signed-off-by: Anubhav Aeron <anubhav_aeron@intuit.com>
  • Loading branch information
shriramsharma authored and Anubhav Aeron committed Sep 19, 2022
1 parent 1d0fe30 commit dde7448
Show file tree
Hide file tree
Showing 64 changed files with 1,809 additions and 1,652 deletions.
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
build:
working_directory: /go/pkg/mod/github.com/admiral
docker:
- image: circleci/golang:1.16
- image: circleci/golang:1.17
steps:
- checkout
- run:
Expand Down Expand Up @@ -107,7 +107,7 @@ jobs:
./run.sh "1.20.14" "1.12.2" "../out"
publish-github-release:
docker:
- image: circleci/golang:1.16
- image: circleci/golang:1.17
working_directory: /go/pkg/mod/github.com/admiral
steps:
- attach_workspace:
Expand Down
14 changes: 9 additions & 5 deletions admiral/pkg/apis/admiral/routes/handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,22 @@ package routes

import (
"bytes"
"context"
"encoding/json"
"io/ioutil"
"net/http/httptest"
"strings"
"testing"

"github.com/gorilla/mux"
"github.com/istio-ecosystem/admiral/admiral/pkg/clusters"
"github.com/istio-ecosystem/admiral/admiral/pkg/controller/common"
"github.com/istio-ecosystem/admiral/admiral/pkg/controller/istio"
"github.com/istio-ecosystem/admiral/admiral/pkg/controller/secret"
"github.com/stretchr/testify/assert"
"io/ioutil"
"istio.io/client-go/pkg/apis/networking/v1alpha3"
istiofake "istio.io/client-go/pkg/clientset/versioned/fake"
"net/http/httptest"
"strings"
"testing"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

func TestReturnSuccessGET(t *testing.T) {
Expand Down Expand Up @@ -93,6 +96,7 @@ func TestGetClusters(t *testing.T) {
}

func TestGetServiceEntriesByCluster(t *testing.T) {
ctx := context.Background()
url := "https://admiral.com/cluster/cluster1/serviceentries"
opts := RouteOpts{
RemoteRegistry: clusters.NewRemoteRegistry(nil, common.AdmiralParams{}),
Expand Down Expand Up @@ -158,7 +162,7 @@ func TestGetServiceEntriesByCluster(t *testing.T) {
}
opts.RemoteRegistry = rr
if c.name == "success with service entry for cluster" {
fakeIstioClient.NetworkingV1alpha3().ServiceEntries("admiral-sync").Create(&v1alpha3.ServiceEntry{})
fakeIstioClient.NetworkingV1alpha3().ServiceEntries("admiral-sync").Create(ctx, &v1alpha3.ServiceEntry{}, v1.CreateOptions{})
}
opts.GetServiceEntriesByCluster(w, r)
resp := w.Result()
Expand Down
6 changes: 4 additions & 2 deletions admiral/pkg/apis/admiral/routes/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,13 @@ func (opts *RouteOpts) GetServiceEntriesByCluster(w http.ResponseWriter, r *http
params := mux.Vars(r)
clusterName := strings.Trim(params["clustername"], " ")

var response []v1alpha3.ServiceEntry
var response []*v1alpha3.ServiceEntry

ctx := r.Context()

if clusterName != "" {

serviceEntriesByCluster, err := clusters.GetServiceEntriesByCluster(clusterName, opts.RemoteRegistry)
serviceEntriesByCluster, err := clusters.GetServiceEntriesByCluster(ctx, clusterName, opts.RemoteRegistry)

if err != nil {
log.Printf("API call get service entry by cluster failed for clustername %v with Error: %v", clusterName, err.Error())
Expand Down
1 change: 1 addition & 0 deletions admiral/pkg/apis/admiral/v1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

41 changes: 33 additions & 8 deletions admiral/pkg/client/clientset/versioned/clientset.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion admiral/pkg/client/clientset/versioned/fake/register.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit dde7448

Please sign in to comment.