Skip to content

Commit

Permalink
Fix order map test (#1447)
Browse files Browse the repository at this point in the history
Signed-off-by: Javier López Barba <javier@okteto.com>
  • Loading branch information
jLopezbarb committed Apr 23, 2021
1 parent 2602d4f commit ef70ac4
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions pkg/model/dev_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,17 @@ forward:
t.Errorf("command was parsed: %+v", d)
}

if !reflect.DeepEqual(d.Environment, tt.expectedEnvironment) {
t.Errorf("environment was not parsed correctly:\n%+v\n%+v", d.Environment, tt.expectedEnvironment)
for _, env := range d.Environment {
found := false
for _, expectedEnv := range tt.expectedEnvironment {
if env.Name == expectedEnv.Name && env.Value == expectedEnv.Value {
found = true
break
}
}
if !found {
t.Errorf("environment was not parsed correctly:\n%+v\n%+v", d.Environment, tt.expectedEnvironment)
}
}

if !reflect.DeepEqual(d.Forward, tt.expectedForward) {
Expand Down

0 comments on commit ef70ac4

Please sign in to comment.