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:
parent
f10356641a
commit
247f358b94
5 changed files with 205 additions and 123 deletions
|
@ -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}
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue