Files
.github
api
cmd
docs
examples
install
internal
api
app
appmain
config
filter
ipb
logging
rpc
clientcache.go
clientcache_test.go
clients.go
clients_test.go
insecure.go
insecure_test.go
server.go
server_test.go
tls_server.go
tls_server_test.go
tls_util.go
statestore
telemetry
util
pkg
testing
third_party
tools
tutorials
.dockerignore
.gcloudignore
.gitignore
.golangci.yaml
CONTRIBUTING.md
Dockerfile.base-build
Dockerfile.ci
Dockerfile.cmd
LICENSE
Makefile
README.md
cloudbuild.yaml
code-of-conduct.md
doc.go
go.mod
go.sum
open-match/internal/rpc/insecure_test.go
Mridul Goswami 4b8761ac99 release 1.6.0-rc.1 changes ()
* Default values of configs ()

* setting validation and default values of configs

* config check in internal/config package

* Add open-match-override setting ()

* Add open-match-override setting

* Added enabled

Co-authored-by: Jon Foust <38893532+syntxerror@users.noreply.github.com>
Co-authored-by: Mridul Goswami <mridulgoswami@google.com>

* shifted e2e tests to project root ()

* release 1.6.0-rc.1 changes

* release changes for tutorials

* remaining changes

Co-authored-by: kemurayama <7068107+kemurayama@users.noreply.github.com>
Co-authored-by: Jon Foust <38893532+syntxerror@users.noreply.github.com>
2022-12-06 12:45:31 -05:00

55 lines
1.5 KiB
Go

// Copyright 2019 Google LLC
//
// 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
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// 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.
package rpc
import (
"fmt"
"net/http"
"testing"
"time"
"open-match.dev/open-match/pkg/pb"
"github.com/stretchr/testify/require"
"google.golang.org/grpc"
shellTesting "open-match.dev/open-match/testing"
)
func TestInsecureStartStop(t *testing.T) {
require := require.New(t)
grpcL := MustListen()
httpL := MustListen()
ff := &shellTesting.FakeFrontend{}
params := NewServerParamsFromListeners(grpcL, httpL)
params.AddHandleFunc(func(s *grpc.Server) {
pb.RegisterFrontendServiceServer(s, ff)
}, pb.RegisterFrontendServiceHandlerFromEndpoint)
s := newInsecureServer(grpcL, httpL)
defer s.stop()
err := s.start(params)
require.Nil(err)
conn, err := grpc.Dial(fmt.Sprintf(":%s", MustGetPortNumber(grpcL)), grpc.WithInsecure())
require.Nil(err)
defer conn.Close()
endpoint := fmt.Sprintf("http://localhost:%s", MustGetPortNumber(httpL))
httpClient := &http.Client{
Timeout: time.Second,
}
runGrpcWithProxyTests(t, require, s, conn, httpClient, endpoint)
}