mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-11 04:52:08 +00:00
DRA Node E2E: add NodePrepareResourceCalled API
This commit is contained in:
parent
673d0aaa60
commit
5c5f6e8fe2
@ -17,6 +17,8 @@ limitations under the License.
|
|||||||
package app
|
package app
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"strings"
|
||||||
|
|
||||||
"github.com/onsi/gomega/gcustom"
|
"github.com/onsi/gomega/gcustom"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -30,3 +32,13 @@ var BeRegistered = gcustom.MakeMatcher(func(actualCalls []GRPCCall) (bool, error
|
|||||||
}
|
}
|
||||||
return false, nil
|
return false, nil
|
||||||
}).WithMessage("contain successful NotifyRegistrationStatus call")
|
}).WithMessage("contain successful NotifyRegistrationStatus call")
|
||||||
|
|
||||||
|
// NodePrepareResouceCalled checks that NodePrepareResource API has been called
|
||||||
|
var NodePrepareResourceCalled = gcustom.MakeMatcher(func(actualCalls []GRPCCall) (bool, error) {
|
||||||
|
for _, call := range actualCalls {
|
||||||
|
if strings.HasSuffix(call.FullMethod, "/NodePrepareResource") && call.Err == nil {
|
||||||
|
return true, nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false, nil
|
||||||
|
}).WithMessage("contain NodePrepareResource call")
|
||||||
|
Loading…
Reference in New Issue
Block a user