1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-24 07:49:41 +02:00

fix(code): revert omitempty optimization EE-6269 (#10548)

This commit is contained in:
andres-portainer 2023-10-27 17:33:04 -03:00 committed by GitHub
parent f10356641a
commit 247f358b94
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 205 additions and 123 deletions

View file

@ -28,13 +28,13 @@ func Test_EndpointList_AgentVersion(t *testing.T) {
GroupID: 1,
Type: portainer.AgentOnDockerEnvironment,
Agent: struct {
Version string `json:"Version,omitempty" example:"1.0.0"`
Version string `example:"1.0.0"`
}{
Version: "1.0.0",
},
}
version2Endpoint := portainer.Endpoint{ID: 2, GroupID: 1, Type: portainer.AgentOnDockerEnvironment, Agent: struct {
Version string `json:"Version,omitempty" example:"1.0.0"`
Version string `example:"1.0.0"`
}{Version: "2.0.0"}}
noVersionEndpoint := portainer.Endpoint{ID: 3, Type: portainer.AgentOnDockerEnvironment, GroupID: 1}
notAgentEnvironments := portainer.Endpoint{ID: 4, Type: portainer.DockerEnvironment, GroupID: 1}

View file

@ -22,12 +22,12 @@ func Test_Filter_AgentVersion(t *testing.T) {
version1Endpoint := portainer.Endpoint{ID: 1, GroupID: 1,
Type: portainer.AgentOnDockerEnvironment,
Agent: struct {
Version string `json:"Version,omitempty" example:"1.0.0"`
Version string `example:"1.0.0"`
}{Version: "1.0.0"}}
version2Endpoint := portainer.Endpoint{ID: 2, GroupID: 1,
Type: portainer.AgentOnDockerEnvironment,
Agent: struct {
Version string `json:"Version,omitempty" example:"1.0.0"`
Version string `example:"1.0.0"`
}{Version: "2.0.0"}}
noVersionEndpoint := portainer.Endpoint{ID: 3, GroupID: 1,
Type: portainer.AgentOnDockerEnvironment,