1
0
Fork 0

Merge branch v2.11 into v3.4

This commit is contained in:
romain 2025-06-02 11:38:16 +02:00
commit bd4bfd8919
110 changed files with 493 additions and 494 deletions

View file

@ -1,7 +1,6 @@
package nomad
import (
"context"
"testing"
"time"
@ -251,8 +250,7 @@ func Test_defaultRule(t *testing.T) {
err := p.Init()
require.NoError(t, err)
ctx := context.TODO()
config := p.buildConfig(ctx, test.items)
config := p.buildConfig(t.Context(), test.items)
require.Equal(t, test.expected, config)
})
}
@ -3077,8 +3075,7 @@ func Test_buildConfig(t *testing.T) {
err := p.Init()
require.NoError(t, err)
ctx := context.TODO()
c := p.buildConfig(ctx, test.items)
c := p.buildConfig(t.Context(), test.items)
require.Equal(t, test.expected, c)
})
}
@ -3246,8 +3243,7 @@ func Test_buildConfigAllowEmptyServicesTrue(t *testing.T) {
err := p.Init()
require.NoError(t, err)
ctx := context.TODO()
c := p.buildConfig(ctx, test.items)
c := p.buildConfig(t.Context(), test.items)
require.Equal(t, test.expected, c)
})
}
@ -3379,8 +3375,7 @@ func Test_buildConfigAllowEmptyServicesFalseDefault(t *testing.T) {
err := p.Init()
require.NoError(t, err)
ctx := context.TODO()
c := p.buildConfig(ctx, test.items)
c := p.buildConfig(t.Context(), test.items)
require.Equal(t, test.expected, c)
})
}
@ -3428,8 +3423,8 @@ func Test_keepItem(t *testing.T) {
p := new(Provider)
p.SetDefaults()
p.Constraints = test.constraints
ctx := context.TODO()
result := p.keepItem(ctx, test.i)
result := p.keepItem(t.Context(), test.i)
require.Equal(t, test.exp, result)
})
}