mirror of
https://github.com/netbirdio/netbird.git
synced 2024-12-13 10:21:10 +01:00
fix test expectation
This commit is contained in:
parent
c2fbe54fe4
commit
df81493ddd
@ -155,6 +155,7 @@ func TestPoliciesGetPolicy(t *testing.T) {
|
|||||||
|
|
||||||
func TestPoliciesWritePolicy(t *testing.T) {
|
func TestPoliciesWritePolicy(t *testing.T) {
|
||||||
str := func(s string) *string { return &s }
|
str := func(s string) *string { return &s }
|
||||||
|
emptyString := ""
|
||||||
tt := []struct {
|
tt := []struct {
|
||||||
name string
|
name string
|
||||||
expectedStatus int
|
expectedStatus int
|
||||||
@ -183,8 +184,9 @@ func TestPoliciesWritePolicy(t *testing.T) {
|
|||||||
expectedStatus: http.StatusOK,
|
expectedStatus: http.StatusOK,
|
||||||
expectedBody: true,
|
expectedBody: true,
|
||||||
expectedPolicy: &api.Policy{
|
expectedPolicy: &api.Policy{
|
||||||
Id: str("id-was-set"),
|
Id: str("id-was-set"),
|
||||||
Name: "Default POSTed Policy",
|
Name: "Default POSTed Policy",
|
||||||
|
Description: &emptyString,
|
||||||
Rules: []api.PolicyRule{
|
Rules: []api.PolicyRule{
|
||||||
{
|
{
|
||||||
Id: str("id-was-set"),
|
Id: str("id-was-set"),
|
||||||
@ -227,8 +229,9 @@ func TestPoliciesWritePolicy(t *testing.T) {
|
|||||||
expectedStatus: http.StatusOK,
|
expectedStatus: http.StatusOK,
|
||||||
expectedBody: true,
|
expectedBody: true,
|
||||||
expectedPolicy: &api.Policy{
|
expectedPolicy: &api.Policy{
|
||||||
Id: str("id-existed"),
|
Id: str("id-existed"),
|
||||||
Name: "Default POSTed Policy",
|
Name: "Default POSTed Policy",
|
||||||
|
Description: &emptyString,
|
||||||
Rules: []api.PolicyRule{
|
Rules: []api.PolicyRule{
|
||||||
{
|
{
|
||||||
Id: str("id-existed"),
|
Id: str("id-existed"),
|
||||||
|
Loading…
Reference in New Issue
Block a user