mirror of
https://github.com/fluxcd/flagger.git
synced 2026-04-15 06:57:34 +00:00
20 lines
451 B
Go
20 lines
451 B
Go
package canary
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/require"
|
|
)
|
|
|
|
func TestDeploymentController_IsReady(t *testing.T) {
|
|
mocks := newDeploymentFixture()
|
|
err := mocks.controller.Initialize(mocks.canary, true)
|
|
require.NoError(t, err, "Expected primary readiness check to fail")
|
|
|
|
err = mocks.controller.IsPrimaryReady(mocks.canary)
|
|
require.Error(t, err)
|
|
|
|
_, err = mocks.controller.IsCanaryReady(mocks.canary)
|
|
require.NoError(t, err)
|
|
}
|