Skip to content

Commit

Permalink
UPSTREAM: <carry>: openshift: Make test names more descriptive, fix w…
Browse files Browse the repository at this point in the history
…rong named test.
  • Loading branch information
lobziik authored and openshift-merge-robot committed Jun 11, 2021
1 parent 3323fac commit 8301076
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions pkg/cloud/azure/actuators/machine/reconciler_test.go
Expand Up @@ -28,7 +28,7 @@ func TestExists(t *testing.T) {
errExpected bool
}{
{
name: "Succeded provisioning state",
name: "VM has 'Succeeded' ProvisiongState",
vmService: &FakeVMService{
Name: "machine-test",
ID: "machine-test-ID",
Expand All @@ -38,16 +38,17 @@ func TestExists(t *testing.T) {
errExpected: false,
},
{
name: "Updating provisioning state",
name: "VM has 'Updating' ProvisiongState",
vmService: &FakeVMService{
Name: "machine-test",
ID: "machine-test-ID",
ProvisioningState: string(v1beta1.VMStateUpdating),
},
expected: true,
expected: true,
errExpected: false,
},
{
name: "Creating provisioning state",
name: "VM has 'Creating' ProvisiongState",
vmService: &FakeVMService{
Name: "machine-test",
ID: "machine-test-ID",
Expand All @@ -57,7 +58,7 @@ func TestExists(t *testing.T) {
errExpected: false,
},
{
name: "Creating provisioning state",
name: "VM has 'Deleting' ProvisiongState",
vmService: &FakeVMService{
Name: "machine-test",
ID: "machine-test-ID",
Expand All @@ -67,7 +68,7 @@ func TestExists(t *testing.T) {
errExpected: true,
},
{
name: "Arbitrary provisioning state",
name: "VM has some arbitrary ProvisiongState",
vmService: &FakeVMService{
Name: "machine-test",
ID: "machine-test-ID",
Expand All @@ -77,7 +78,7 @@ func TestExists(t *testing.T) {
errExpected: false,
},
{
name: "Failed provisioning state",
name: "VM has 'Failed' ProvisiongState",
vmService: &FakeVMService{
Name: "machine-test",
ID: "machine-test-ID",
Expand All @@ -87,7 +88,7 @@ func TestExists(t *testing.T) {
errExpected: true,
},
{
name: "Not found err",
name: "VM does not exists",
vmService: &FakeBrokenVmService{
ErrorToReturn: autorest.DetailedError{
StatusCode: 404,
Expand Down

0 comments on commit 8301076

Please sign in to comment.