Files
ziti/common/bindpoints/bindpoints_test.go
Andrew Martinez c367679e79 fixes openziti/ziti#3626 omit overlay bind points from /versions apiB… (#3663)
* fixes openziti/ziti#3626 omit overlay bind points from /versions apiBaseUrls

- adds BindPointTypeUnderlay and BindPointTypeOverlay constants
- implements Type() on UnderlayBindPoint and OverlayBindPoint
- skips non-underlay bind points when building apiBaseUrls in version_router
- skips non-underlay bind points in GetApiAddresses
- adds unit tests for Type() on both bind point implementations
- updates xweb
2026-03-10 09:57:50 -04:00

34 lines
897 B
Go

/*
Copyright NetFoundry 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
https://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 bindpoints
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestUnderlayBindPoint_Type(t *testing.T) {
u := UnderlayBindPoint{}
assert.Equal(t, BindPointTypeUnderlay, u.Type())
}
func TestOverlayBindPoint_Type(t *testing.T) {
o := OverlayBindPoint{}
assert.Equal(t, BindPointTypeOverlay, o.Type())
}