Documentation ¶
Overview ¶
* Copyright 2019-present Open Networking Foundation * * 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.
Index ¶
- Constants
- Variables
- func AssertErrorEqual(t *testing.T, err error, expected string) error
- func AssertJSONEqual(t *testing.T, actual string, expected string) error
- func AssertStringEqual(t *testing.T, actual string, expected string) error
- func IsReady() (bool, error)
- func StartMockServer(data_name string) error
- func StopMockServer() error
- func WaitForReady() error
Constants ¶
const (
CONTAINER_NAME = "xos-mock-grpc-server"
)
Variables ¶
var MockDir = os.Getenv("CORDCTL_MOCK_DIR")
Functions ¶
func AssertErrorEqual ¶
Assert that the error string is what we expect
func AssertJSONEqual ¶
Assert that two JSON-encoded strings are equal
func StartMockServer ¶
Start the mock server and wait for it to be ready
`data_name` is the name of the data.json to tell the mock server to use. If a mock server is already running with the same data_name, it is not restarted.
Types ¶
This section is empty.